Solved

Download all files with one click

Posted on 2014-01-09
7
587 Views
Last Modified: 2014-01-18
I have a button that allows me to download a file. the links come from a recordset which holds the path to the file and the names of the files.

Is there a way to download ALL files with one button ?   Instead of having multiple buttons one for each file ?

I am using classic ASP/VB
0
Comment
Question by:amucinobluedot
  • 3
  • 2
  • 2
7 Comments
 
LVL 52

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 250 total points
Comment Utility
You would probably want to have the files zipped up first then download.  

If you are using file system object you can loop through and send the files one at a time but too many too fast may not be good.  Can you post the code you are using now?
0
 
LVL 32

Assisted Solution

by:Big Monty
Big Monty earned 250 total points
Comment Utility
it would be bad practice to even attempt to download multiple files at once, as this would be considered a security breach. Even if you have good intentions, this type of functionality would be considered malicious. I know if I went to a web page and clicked a link and multiple files started showing up on my hard drive, I'd be a little freaked out!

You have 2 options, either have them all zipped up in one file like Scott suggested, and have the user use 1 link, or have all of the files and have the user manually initiate each download.
0
 

Author Comment

by:amucinobluedot
Comment Utility
Here is the scenario.

This is in a secure intranet. User uploads a copy of someone's birth certificate, a week later they upload a copy of their passport, a month later the driver's license and so on.
A year later they end up with say 15 documents, at this point they want to download all of them. They are not zipped because they were uploaded in the course of a full year and downloading one at the time takes a lot of time.
This is why they are asking me if there is a way to add an option to download all the documents in the person's file.
I have a recordset with the path to the folder were the files are stored and also a recordset with the file names (loops as they are multiple files).

I hope that clarifies why the options listed above are not feasible.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 32

Assisted Solution

by:Big Monty
Big Monty earned 250 total points
Comment Utility
with this scenario, I would just zip the files on the fly. Create a link on your page:

<a href="page.asp?files=all">get all files</a>

and use the following tutorial to learn how to zip the files up. I recommend the gzip option if you have access to install it on your server

http://www.4guysfromrolla.com/webtech/030800-1.shtml
0
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 250 total points
Comment Utility
Another option is to store the items in your database.  First convert to base64 then encrypt.  Now those confidential items can't be viewed by accident by the wrong people as they are not a drive and you can generate whatever output you need on the fly.  But this would require a one time script to convert.  

If you don't have the classic asp components for this, I have just created what I needed as a webservice in php as a funciton.  Then post the php and output my base64, encrypted code back to my asp page.
0
 

Author Comment

by:amucinobluedot
Comment Utility
Thanks. Storing the files in the database is not an option, its a 10 yr old system and all files are in a folder into which all new files are also uploaded.
We would need to zip on the fly as you mentioned so that then they can be downloaded.
I will look into that. And yes, I have a dedicated server with full access to install anything in it.
0
 

Author Closing Comment

by:amucinobluedot
Comment Utility
NA
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Accessibility and Usability are two concepts that seem to be closely related.  But, too many people seem to have a distorted perception of them. During last five years, those two words have come to the day-to-day work of almost every web develope…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now