Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

250
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!