Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple File Downloads

Status
Not open for further replies.

moonoo

Programmer
May 17, 2000
62
0
0
US
Hi ,
I have a jsp page which lists files with check boxes for
download . Once i click the check boxes it should ask me the saving location and download the files which are checked(multiple download) . Right now i am able to implement a single file download . But i am not able to do so for multiple files . Also the default hyperlink in the file askes me "save , open , cancel' . I don't want to give the open option to the user .
Kindly help me in implementing these functionalities. If multiple download is not possible in JSP / Java , please let me know why technically its not possible.
Any help is appreciated.
Regards
Dev
 
I don't believe it is possible, because browsers only support uploading a single file - of course its technically possible, but common browsers don't support it - you'd have to write your own browser :)

Have a read of the RFC though to confirm this - I cant see anything about uploading multiple files :
--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Dev,

I think you're asking about downloads and sedj is talking about uploads. Nonetheless, what sedj states is incorrect. Most browsers support what's called "multipart/form-data" with which you can upload multiple files in a single post. Do a web search for it and you'll find a few multipart servlet implementations that people have written. O'reilly has one, for example.

However, if I've interpreted your question correctly, you are interested in a multi-download scheme.

The single file download restriction is just the way browsers work in my experience. I don't think there's a way to get any browser to download multiple files at the same time. I'm not sure why a multi-download paradigm has never been adopted. The fact that your post is the first mention of missing such a thing I've ever seen in my decade+ as a programmer may be one indicator as to why.

Consider two less-elegent solutions:
1) Provide the user with a list of URLs to click based on the boxes they check and submit. They can pick save locations individually for each file as they click them.

2) Zip up their file choices server-side and send them in a single file.

Hope this helps.

Site: Location: SF Bay Area
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top