Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

266
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda