zip / unzip uploaded files seamlessly

B

bradley

I am developing a website which allows a user to upload documents (MS Word,
PDF, etc) to a folder located beneath the website root. This works fine.
However, for storage space and security reasons, I would like to have the
process compress the file with encryption prior to writing it to the folder.
Perhaps the filename could be the same as the original, but with an
additional .zip extention. For example: sales2004.xls.zip. When the user
clicks on a link to download the file, I would like to have them download an
uncompressed version of the file without the zip extension, so it is
transparent from the user's perspective.
Are there any free libraries to compress / uncompress the pkzip format with
encryption?
Would the best approach for making this a seamless operation for users be to
program around the file stream?
Any general advice or alternative implementations from someone who has done
something similar before?
 
S

Steve C. Orr [MVP, MCSD]

If I was you I'd first try using the J# zip classes:
http://msdn.microsoft.com/msdnmag/issues/03/06/ZipCompression/default.aspx

Or I've heard of people having success with this code:
http://www.icsharpcode.net/Ope­nSource/SharpZipLib/Default.as­px

Or you could consider calling a command line utility like this:
http://www.i386.info/software/­zip23xn.zip

Or you could consider a 3rd party component such as this:
http://www.xceedsoft.com/products/zipnet

Perhaps this free PDF code will also be of use to you:
http://www.ujihara.jp/iTextdotNET/en/index.html
 
A

AlexL [Xceed]

What you seem to need is a component that can zip/unzip with support
for the latest Zip format, which offers AES strong encryption. There
are, to my knowledge, no free libraries that support the latest Zip
format. That is asking a lot from a free library.

I am developing a website which allows a user to upload documents (MS Word,
PDF, etc) to a folder located beneath the website root. This works fine.
However, for storage space and security reasons, I would like to have the
process compress the file with encryption prior to writing it to the folder.
Perhaps the filename could be the same as the original, but with an
additional .zip extention. For example: sales2004.xls.zip. When the user
clicks on a link to download the file, I would like to have them download an
uncompressed version of the file without the zip extension, so it is
transparent from the user's perspective.
Are there any free libraries to compress / uncompress the pkzip format with
encryption?
Would the best approach for making this a seamless operation for users be to
program around the file stream?
Any general advice or alternative implementations from someone who has done
something similar before?

--
Alex Leblanc
Xceed Software Inc.
http://www.xceedsoft.com

High-quality ActiveX and .NET libraries and controls

Email: (e-mail address removed) (remove the first 'x')
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top