Solved

upload files will stored in server and name will be stored in database.

Posted on 2010-09-16
4
545 Views
Last Modified: 2013-11-15
I have to upload files in my web page and file names will stored in database, but my files will be stored in a folder. When they download files will be download in zip format, how  will I do that ? can any expert help me.
0
Comment
Question by:Tapan Pattanaik
  • 2
4 Comments
 
LVL 4

Assisted Solution

by:antonybrahin
antonybrahin earned 100 total points
ID: 33698354
there is no libraries available in .net

u can use this. its third party and its free with source code.

http://www.icsharpcode.net/OpenSource/SharpZipLib/
0
 
LVL 21

Author Comment

by:Tapan Pattanaik
ID: 33698421
any other websites or links ?
0
 
LVL 8

Accepted Solution

by:
cubaman_24 earned 400 total points
ID: 33699782
Hello:
I found very much easier to use Ionic Zip library, also free and opensource.
http://dotnetzip.codeplex.com/

private void MyExtract()
  {
      string zipToUnpack = "C1P3SML.zip";
      string unpackDirectory = "Extracted Files";
      using (ZipFile zip1 = ZipFile.Read(zipToUnpack))
      {
          // here, we extract every entry, but we could extract conditionally
          // based on entry name, size, date, checkbox status, etc.  
          foreach (ZipEntry e in zip1)
          {
            e.Extract(unpackDirectory, ExtractExistingFileAction.OverwriteSilently);
          }
       }
    }

private void CreateZipFile(){
     using (ZipFile zip = new ZipFile())
  {
    zip.AddFile("ReadMe.txt");
    zip.AddFile("7440-N49th.png");
    zip.AddFile("2008_Annual_Report.pdf");        
    zip.Save("Archive.zip");
  }

}

Open in new window

0
 
LVL 21

Author Closing Comment

by:Tapan Pattanaik
ID: 33767909
Thanks to all
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

809 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