Guest User

Untitled

a guest
Jan 18th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. using (ZipFile zipFile = new ZipFile())
  2. {
  3. byte[] data = client.DownloadData("photo.png");
  4.  
  5. zipFile.AddEntry("photo.png", data);
  6.  
  7. Response.ClearContent();
  8. Response.ClearHeaders();
  9. Response.AppendHeader("content-disposition", "attachment; filename=Media.zip");
  10.  
  11. zipFile.Save(Response.OutputStream);
  12. }
Add Comment
Please, Sign In to add comment