Second example of creating a zip file with ASP and csASPZipFile.

These pages show another example of using csASPZipFile to dynamically create a zip file on the server and stream it to the browser. The user can select files from a list and these will be collected and compressed into a zip archive. This example can be downloaded. You will need the csASPZipFile trial component registered on your server as well as having the scripts that are available below.

Download the trial csASPZipFile component - cszft.zip (2.2 MB)

Download the demo scripts - zipdemo2.zip (5 KB)

The files available for download are the entire contents of a directory and they are selected by checking the boxes. They are only one line text files and tiny bitmaps and are completely irrelevant, but it is the idea that matters.

Select the files for download

1.txt
2.txt
3.txt
4.txt
5.txt
6.txt
7.txt
8.txt
9.txt
blue.bmp
green.bmp
red.bmp
  

This example extends the previous example by adding another script between the form and the download. The form submits to that script which displays a page that shows the user that they are in the next stage of the process. Javascript is then used to redirect to the zip creation script and the form variables are passed along. The result of this is that after the download is complete the intermediate script is displayed in the browser instead of the original form.

Click here for a description of how this example works. The sample files also contain a description in the Read Me file.