Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can JavaScript get data from a user's computer?

How can Javascript (running from a website on a remote server) access data from a user's local computer? I have access to all the user's computers and they are all using Chrome. The data may be stored in a file, a database, I can even run a webserver on their computers if needed, etc. Is there any way for my users to for example allow my website to access data from JavaScript? (maybe be there is a Chrome setting but I still want their browser to be secure)

like image 968
Matthew Avatar asked Aug 30 '26 20:08

Matthew


2 Answers

As far as I know, you cannot access the files on the user's machine using javascript. This would be a huge security hole. You have to write a client (not web) application (windows app or whatever technology you are using).

like image 68
Novice in.NET Avatar answered Sep 02 '26 10:09

Novice in.NET


this is not possible just using a browser, because as you said yourself it would`t be secure. You can use some kind of plugin which your users have to allow which then can access the local data on the computer.

like image 30
Daniel Kurka Avatar answered Sep 02 '26 11:09

Daniel Kurka