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

122
Views
URL.createobjecturl() not creating the url for the correct image

I have a hardcoded image file like so like so:

const file = new File(["large base64 encoding in string"], "foo.txt", {
  type: "img/png",
});

I pass this file into URL.createobjecturl() like so:

    var imageUrl =  URL.createObjectURL(file)

However, when I log the imageUrl variable it does not open the correct image, instead it opens a seemingly blank page like so: enter image description here

Why is this happening and how can I go about fixing it? I feel like it has something to do with me hardcoding the base 64 encoding for the image or the fact that the base 64 encoding is in a string?

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!