• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Downloading multiple files on a single button click

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,

I'm trying to achieve a functionality to download multiple files on a single button click. What I have done for now is that I've used a JQuery plugin that does this:

http://biesiad.github.com/multiDownload/



This seems to do just what was intended (triggering the click event for all links) and thereby starting the downloads. However, for every download initiated, it would open a 'Save as...' download box where I need to specify a location for this download.
Now, for a large number of files, this becomes a problem. Wondering if it would be possible to just ask for the download location for the first file and rest of the files in that batch get saved to the same location? (I understand this would be a security concern and most likely would not be possible).

Tweaking the browser settings would achieve something similar but it would not ask for the download location in the first place and would save in the default location specified.

Here's a summary of what is required:

1) User clicks on a link to download a batch of files.
2) The first download is initiated asking for a location to save the file.
3) All subsequent files are saved to the same location.

Any pointers in the right direction would be very helpful. I'll then try to take it forward from there.

Appreciate your time and inputs.
 
Ishu Saxena
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could not find how to edit my OP.
Just a couple of pointers:

1) I'm using Spring framework 3.0.5.
2) Bundling the individual files into a zip archive is not an option.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not possible.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know if this is related, but I think this behavior could also be tied dow to your browser preferences.
I use chrome and have configured it to use the Downloads folder. I never get asked where to download. However, for multiple downloads, I do get a confirmation dialog which says something like "This site is attempting to download multiple files".
 
Ishu Saxena
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Maneesh and Bear.
Maneesh, yes, this is something that is primarily determined by browser preferences. I was probably looking for a way to somehow override this behavior so that it is consistent across all browsers.
 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe you might want to consider serving the files in a zipped format so it's one download.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As I said it is not possible to override browser settings. Thank goodness. Imagine the security nightmare if you could.
reply
    Bookmark Topic Watch Topic
  • New Topic