views:

42

answers:

2

Is it possible to create a web based script that would allow a user to sequentially download multiple files without causing the user to accept each forced download?

Potential Process:

User selects files to download. User selects directory or directory is predefined within the script. Files are downloaded to their local drive sequentially.

Thanks!

+3  A: 

That doesn't work without a plug-in, and would be a serious security hole if it did.

What you could do is zip the files with PHP (either now or at run-time) and let the user download the archive. It's the method used by a lot of sites now, even if the archive is highly customizable.

Examples:
http://painterlypack.net/customizer.php
http://jqueryui.com/download
http://jqueryui.com/themeroller/

Fosco
We've been testing zipArchive and zipstream and have run into file size limitations due to what we think is a memory leak. Are you aware of any other Zip options that could achieve zipping multiple gigs of mp3s? And yes, i figured it was a giant security risk, but the script will only be accessible to a handful of people.
Stephen
@Stephen then you should investigate other options, like FTP. HTTP is not a good way to transfer multiple gigs of data.
Fosco
A: 

I've seen this done with Flex:

http://soegianto.com/blog/2008/07/multiple-file-upload-with-flex-and-php/

...maybe there are some more recent examples/libraries out there as well.

njorden
@njorden Thanks! Unfortunately I'm searching the download equivalent. I've worked with the Jquery Uploadify plugin for multi-file uploading, works brilliantly.
Stephen