Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

130
Vistas
Retrieve screenshot as file from clipboard via JS

With JS, one can loop though the clipbard data items to check if the type of the item is an image, as follows:

...

var items = pasteEvent.clipboardData.items;

for (var i = 0; i < items.length; i++) {
    if (items[i].type.indexOf("image") === -1) {
        return false;
    }

var blob = items[i].getAsFile();

...

But this only works when I copy the file from the system. Instead, using the "Copy screenshot to clipboard" functionality, it won't work.

The item type in that case is called "MULTIPLE".

Do you know if there is a way to get the image as blob if it's coming from "Copy screenshot to clipboard"?

Note that I am testing this on Manjaro Linux with the preinstalled screenshot app. I don't know if the screenshot lives in the clipboard in a different format using other OS or Apps.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda