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

141
Vistas
Reading a OneDrive local JSON file using fetch in JavaScript

I am trying to read a local JSON file using JavaScript. The file is in OneDrive however, and I am operating in Codepen. In the browser console, I get a 404 error.

fetch(".\Users\myName\OneDrive - myOrg\Documents\myFile.json")
  .then(response => response.json())
  .then(json => console.log(json));

Nothing is returning and I get that 404 error. I just want to console.log my json text. I can even convert it to a js file if that works better, but it didn't work here.

The file location actually reads: C:\Users\myName\OneDrive - myOrg\Documents\myFile.json , so am I writing the URL wrong? Is there a way to pull from OneDrive that I am missing? Is it because I am using Codepen? I can't figure it out.

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