Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open a file using javascript, client-side

In my application I want to open a file that exists on a client machine. I created two applications: desktop and web application. When the user installs the desktop application there are some files which is copied to its installation path, and I want to open those files from my web application via javascript.

like image 413
BreakHead Avatar asked Aug 24 '26 15:08

BreakHead


1 Answers

The browser is insulated from the host machine (sandboxed) for security reasons.

The only way for the browser to access local files (apart from those inside the sandbox, ie. cookies and cache) is the HTML file control used by the user explicitly.

like image 154
Oded Avatar answered Aug 26 '26 06:08

Oded



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!