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

218
Views
How to convert a blob image to base 64 in JavaScript?

This is the situation: I get an image as input, and then I have to display it, and i got no issues with that. Next I need to convert the URL.createObjectURL (event.target.files [0]) to base64, in order to pass it to the backend. Do you have any idea how to do it? I will attach the code below.

const onImageChange = (event) => {
  if (event.target.files && event.target.files[0]) {
    setImage(URL.createObjectURL(event.target.files[0]));
    console.log(event.target.files[0]);
    //var convertedImageBase64 = Convert the image i get from file system to base64
    setImageName(convertedImageBase64);
  }
}
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!