This project is read-only.

Need simple download code

Feb 20, 2011 at 2:19 AM

I need to implement a simple download script on my website  I was successfully using the aspeasyzip component on a previous host; however, my new host curiously doesn't provide a zip component.  Unfortunately, I'm not a professional coder and dotnetzip appears well beyond by abilities to implement.     

Basically my site is a massive folder tree of images.  The user simply navigates to the desired subfolder to view and download jpg images.   For convenience I want to provide the ability to download all images in the subfolder to a zip file, deliver the file, then delete the file.  The name of the zip file needs to be the subfolder name.  That's it.  There are probably a dozen other features that I could implement with dotnetzip and am open to ideas, but the core functionality I need is very basic.

[Note: For what it's worth my old method was to use FSO to get the subfolder name & path, then call aspeasyzip to create the archive.  The zip file would then be sent to a canned download script that used ADODB.Stream to deliver the file.  Delete was handled with FSO DeleteFile.]

Thanks in advance for helping.

Feb 24, 2011 at 2:01 AM

Hmm, I'm gonna recommend that you seek the help of a high-school kid or something to script this up.  There are examples in this site, and also in , that do "download files as zip file".   But I don't know how easily these can be adapted to your particular scenario.  It probably wouldn't take long, but it would require some integration work and testing.

If you know FSO and ADODB.Stream, then you should have no problem following along on the examples for using DotNetZip in ASP.NET. 

There is a simple VB.NET example that does almost exactly what you want - see the above site.


Mar 2, 2011 at 1:00 AM

Cheeso, I wasn't sure if I was supposed to be insulted or not.  Or maybe you were insulting the high-school kid.  LOL.  Anyway, I am no coder but have cobbled together a decent site with canned asp scripts, baling wire and bubblegum.  I'm rather proud of my efforts but clearly dotnetzip is beyond my capabilities, or needs for that matter.   For instance, I was finally able to get your demo script running after finally learning about virtual directories.  I understand the purpose, probably necessary for large company sites, but overkill for my "basic" site.   I could have tinkered with dotnetzip for hours (or longer) but time being money I bit the bullett and purchased the $30 license for the aspeasyzip component.  My host installed and it's working perfect.   Meanwhile, keep up the good work on dotnetzip.  I'm sure it meets the needs of many who need a feature rich, highly customizable, zip solution for complex sites.