0

I'm trying to use uploadify control in MVC3. It works fine for uploading files.

Here is my problem:

How can i get the files in .zip file ?. Let me clear the question.

Here is a zip file (say : images.zip). It contains 3 jpeg files.

Now if i upload the images.zip file using upload control on my view page i need to get all the image files in the zip file.

If i uplaod images.zip file it should show all the images like this

enter image description here

I dont know how to get the files and how to start.

I've searched google but didnt get any clue about this.

How to get this? If any Jquery or Javascript code is avaliable please post.

Karthik Chintala
  • 5,465
  • 5
  • 30
  • 60

1 Answers1

0

If you can use .NET 4.5, there is a new ZipFile class that will let you get properties of a zipped archive.

If you're under 4.5, you will need a 3rd party zip file library, like SharpZipLib or DotNetZip.

Dave Thieben
  • 5,388
  • 2
  • 28
  • 38
  • does ZipFile Class supports unzipping the files ? – Karthik Chintala Dec 14 '12 at 04:52
  • the ZipArchive class has a property `Entries` that will let you iterate over the items in the zip file, and an extension method `ExtractToDirectory`. The ZipFile class has static methods to create, open and extract files from a zip file. – Dave Thieben Dec 14 '12 at 13:13
  • can you please check this [thread](http://stackoverflow.com/questions/13873451/unable-to-get-multiple-entries-in-selectentries-of-dotnetzip) and give an answer if possible – Karthik Chintala Dec 14 '12 at 13:34