Question

I have a web-application that I want to have the ability to read a file from a specific directory on the users PC (and send this file to a remote DB via some REST call) - and vice-versa, get this file from the remote DB and write to the users PC in this specific directory. Besides an Applet, what are some of the more common / secure ways of achieving this?

Was it helpful?

Solution

Unfortunately, this is not possible using a web-application. The browser will not allow this - as it represents a security breach on the client side.
You will need explicit permission from the user to upload a file onto the server - most web-applications use a file upload mechanism - which is a manual process.
You could, however use HTML 5 Web Storage, which is similar to cookies, but allows the browser to store key value pairs.
From what I understand, an applet is a Java program which is run outside of the browser on the client machine - which is therefore able to read / write to the local machine.
Hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top