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

311
Views
Failed to load resource err_file_not_found when multiple createObjectURL

With this piece of code, it works fine when I upload only 1 file at a time, but when I upload multiple files, although console.log shows that the URL is created successfully, but when rendering, it shows failed to load resource err_file_not_found.

What's the problem with this piece of code?

const handleUpload = (e) => {
    const files = [];
    for (var i = 0; i < e.target.files.length; i++) {
      files.push(URL.createObjectURL(e.target.files[i]));
    }
    setVideos((prev) => [...prev, files]);
};
<input
  type="file"
  onChange={handleUpload}
  multiple
/>
{videos.map((video) => (
  <img src={video} alt={video} key={video} />
))}
about 4 years ago · Juan Pablo Isaza
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!