Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

142
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda