Kris
Kris

Reputation: 1423

Automatically downloading all files to a user preferred location on the machine

In my web application the client receives a set of file urls as json from the server. On the client side i then need to automatically download all the files and save them to a user preferred location. Is there a way to do this using javascript or jquery ?

Thank You

Upvotes: 0

Views: 261

Answers (2)

mamadrood
mamadrood

Reputation: 757

No. It would be a huge security breach if any website could download any files on your computer. You just can redirect the user to the different file locations, and he will have to select manually where he want to save them.

You can also create an archive on the server-side with a script language (php, sh...) and send this archive so the user need to download one file only, however he will have to unzip the archive on his computer.

Upvotes: 4

SLaks
SLaks

Reputation: 887797

For security reasons, you will never be able to do that.

Upvotes: 0

Related Questions