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

251
Vistas
Losing MIME & other data when using the file() method on FileSystemFileEntry

I'm trying to convert FileSystemFileEntry's into files using the file() method and pushing them to an array, but I'm losing each file's MIME type (and I suspect more). This is causing the browser to not detect these objects as files.

When I log files in an array that haven't been converted with the file() method, we observe: screenshot of console (1)

When I log an array of converted files, we see: screenshot of console(2)

Later on in my code, when I attempt to loop over this array with:

    for (const [index, f] of selectedFiles.entries()) {
         console.log('run');
    }

Or even with a forEach(), nothing happens, and I suspect it's because I'm losing some data in this conversion process. This is causing me to not be able to manipulate this array of converted files. When using files that haven't been converted coming directly from an html input, I don't run into any issues.

Does anyone have any insight on this issue?

[See MDN's docs] (https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileEntry).

about 4 years ago · Santiago Gelvez
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