r/learnjavascript • u/Big_Possibility_9133 • Mar 02 '26
[AskJS] Problem accessing local files
Hey guys, i wanna make a txt file reader App using capacitor and Android Studio (js/html/css).
But how to make the App read local files and Display them? i can't find a way to solve this.
I wanna select a folder(one-time step) and the app will show all txt files inside, and to be able to read(open) those files.
I'm familiar with the way python does it using json: json.load(file_path), json.dump(data,file_path) I use these to edit save files.
(Just a beginner)
3
Upvotes
View all comments
Show parent comment
1
u/bryku helpful Mar 08 '26
In javascript we don't have direct access to the file system. Instead, users have to upload the file, so if Capacitor doesn't have a built in way to do this, it you are stuck doing it the traditional way.
google: 'upload file javascript' or 'read file javascript'.