-2

I have been using a code available in the internet customized as per my requirement. In the javascript file i have a $(document).ready(function() in which i'm loading a csv file from internet. I need to change this to a local file instead of internet file as the code is going to run in a internet less environment.

var X = "https://xxxxxxxxx.csv".replace(/&/g, '&');

Need the help to use a local file instead of web file. Tried file:///D:/Project/X.csv but is not working.

  • 1
    Does this answer your question? [How to open a local disk file with JavaScript?](https://stackoverflow.com/questions/3582671/how-to-open-a-local-disk-file-with-javascript) – Mario Murrent Jul 14 '21 at 10:51

1 Answers1

0

javascript do not allow to access local file. only upload file to an input file than you can process.

Lý Hoài
  • 129
  • 6