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

268
Views
GET <my local path..> ::ERR_UNKNOWN_URL_SCHEME when uploading a local image

I am getting an error in my console every time I upload an image. I'm loading it as Base64. The image uploads successfuly, and I can see the preview but error is there.

The error seems to be displayed asynchronously but I guess it is caused in this function, in the file.ReadAsDataURL method:

export function getBase64FromFile(target) {
    return new Promise((resolve, reject) => {
        let fileReader = new FileReader();

        fileReader.onloadend = fileLoadedEvent => {
            const base64 = fileLoadedEvent.target.result;
            resolve(base64);
        };

        fileReader.onerror = () => {
            reject(fileReader.error);
            console.log('filereader onerror', fileReader.onerror);
            fileReader.abort();
        };

        if (target) {
            fileReader.readAsDataURL(target);
        }
    });
}

Looks like internaly it ends up resolving somehow but the error is annoying me. For example for my path C:/images/autumn.jpg I noticed that the error is:

GET c:%C3%BAkepathutumn.jpg net::ERR_UNKNOWN_URL_SCHEME

I see that the browser changes the route to C:/Fakepath/autumn.jpg for security, but , then where is the slash between Fakepath and autumn?

The error only apears in chrome, in Firefox, no error is shown.

I also tried with adding any sort of prefix as "File:///" in my target, but then It doesn't work.

Any help would be apreciated. Thanks!

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!