Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using (ZipFile zipFile = new ZipFile())
- {
- byte[] data = client.DownloadData("photo.png");
- zipFile.AddEntry("photo.png", data);
- Response.ClearContent();
- Response.ClearHeaders();
- Response.AppendHeader("content-disposition", "attachment; filename=Media.zip");
- zipFile.Save(Response.OutputStream);
- }
Add Comment
Please, Sign In to add comment