Page 1 of 1

help with multiple file downloads

Posted: Wed May 14, 2008 2:55 pm
by danlagi32
ok, so I've looked and looked for ways to do the following:

1. user opens php page that displays a local (server) folder with available files to download to their computer
2. user selects one or more files to download, then clicks on Download button
3. popup window appears asking for the folder on the local machine to copy the selected files to
4. copying starts, keeping the filenames the same as on the server, overwriting files with the same name
5. the user is notified when the copy completes

I know all the security pitfalls of letting a download occur without user intervention, but in a way I'm determining what the user can download (lots of checks in place to prevent hackers performing a download), they only select the files and choose the folder destination. Sort of what FTP does but from the server side, not the client side. The database and files to download reside on the server side so I'm sort of locked into initiating it from a web portal (php/mysql based) system.

I've also contemplated creating a zip file of the selected files and just downloading the one file, but I don't want the user to have to manually unzip the file once it's downloaded. I'm trying to get around a lot of user interaction, to save the user keystrokes. A mandate from the higher ups in my company.

Comments and suggestions welcomed, please no sly remarks. Thanks!

Dan

Re: help with multiple file downloads

Posted: Wed May 14, 2008 3:06 pm
by JacobT
Hey Dan, there's no way, that I know of, to do exactly what you say. You can zip or allow independent download of each file, but you can't use a custom file dialog. If that were possible, anyone could download files to your computer without your knowledge. You can do a PHP FTP setup, but the issues with getting through user's firewalls and all the various security issues would be mind bottling (heh).

If they select a download location for the first file, most all browsers will use that last location for the next file and so on and so on.

If you find a solution for this, I'd be interested in it as well.

Re: help with multiple file downloads

Posted: Wed May 14, 2008 3:27 pm
by danlagi32
Hey JacobT, thanks for your post. I'm getting the same response from others on other forums. Nothing I didn't expect to get, because I agree with the majority of those who believe that file downloads should not be automated. But I needed to ask, just in case someone has figured it out. I'll leave this post active for a couple of days, then I'll close it.

For those of you reading this...the majority, no need to post "me too's". Thanks! 8)