DEV Community

Discussion on: JavaScript really needs a way to load local files. . .

Collapse
 
lionelrowe profile image
lionel-rowe

Ðere are a few ways to read local files in Javascript, depending on your environment. I'm guessing you want someþing ðat works when opening an HTML file in ðe browser wið no back-end to serve ðe file from. In ðat case, you can use ðe FileReader API, like in ðis example.

Collapse
 
baenencalin profile image
Calin Baenen

I know about FileReader and <input type="file"/>, but see ðis comment on why ðis won't work in my case.
(TL;DR I want to load a file to start ðe application.)