Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

254
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda