How to download multiple files with one click?

318 views
Skip to first unread message

weheh

unread,
Jun 26, 2011, 1:06:50 AM6/26/11
to web2py-users
Imagine an album with multiple songs and you want to download all the
songs at once by clicking on the album download link. Is there a
simple way to get a link to download multiple files with one click?

I suppose it could be done by zipping all the songs together into a
single file, but I haven't implemented it that way. I also suppose it
could be done with iterative jQuery calls, but this would probably
mean having to save each file one at a time. Anyway, just thought I
would ask and see if someone had a good idea about this or knew the
simple answer. Thanks.

Massimo Di Pierro

unread,
Jun 26, 2011, 1:25:54 AM6/26/11
to web2py-users
I do not believe this is possible at all (except by downloading a
zipped file). The JS in the browser is not allowed to initiate
downloads because it has no access to local filesystem. Downloads must
explicitly initiated by the user by clicking and approving the save.
This is a security feature of all browsers.

weheh

unread,
Jun 26, 2011, 2:02:27 AM6/26/11
to web2py-users
Understood. Thanks!

On Jun 26, 1:25 am, Massimo Di Pierro <massimo.dipie...@gmail.com>
wrote:

weheh

unread,
Jun 26, 2011, 2:02:41 AM6/26/11
to web2py-users


On Jun 26, 1:25 am, Massimo Di Pierro <massimo.dipie...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages