I have php script which allow user to download file. By default when user choose to save file (not to open it with any of his programs) it is saved in the “Downloads” folder of the browser. My question is can I set folder on the user computer where file should be saved?
Share
No.
It’s the user’s computer, so the user decides where to store the file. You don’t even know how the file system is organized – it may be Unix or Windows, where the paths would differ significantly.
In fact, you can achieve this using some client-side technology like a trusted java application. The user then gets a security warning, and if he decides to accept, your applet can read and write the file system. But you surely don’t want to do this.