This is a migrated thread and some comments may be shown as answers.

Extracting zip contents at server

1 Answer 36 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Sameer
Top achievements
Rank 1
Sameer asked on 02 Jul 2013, 09:05 AM
Hi 

In one of my page, I am using this control to upload a single zip file. So does it provide an option to extract contents at the target some how?

Thanks
Sameer

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 02 Jul 2013, 10:32 AM
Hi Sameer,

Please have a look at the following code I tried which works fine at my end. In the following code the uploaded zip file is present in the "zipPath". For the following code to work you need to reference the System.IO.Compression.FileSystem dll. The particular DLL can be downloaded from this link.

C#:
protected void RadButton2_Click(object sender, EventArgs e)
{
    string zipPath = Path.Combine(Server.MapPath("~/Images/FinalUpload"), "User1.zip");
    ZipFile.ExtractToDirectory(zipPath, "E:/");
}

Thanks,
Shinu.
Tags
AsyncUpload
Asked by
Sameer
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or