-----------------
string filepath = Server.MapPath("download/flag.png");
zip.AddFile(filepath, folder);
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename=DownloadedFile.zip");
Response.ContentType = "application/zip";
zip.Save(Response.OutputStream);
Response.End();
-----------------its Completely Working
But When i give DropBox Public path as filepath
--------------------------
string filepath = "https://dl.dropboxusercontent.com/u/155062858/flag.png";
--------------------------
its Occur Error The given path's format is not supported.
Thanks in Advance.
But When i give DropBox Public path as filepath
--------------------------
string filepath = "https://dl.dropboxusercontent.com/u/155062858/flag.png";
--------------------------
its Occur Error The given path's format is not supported.
Thanks in Advance.


Iftikar HussainRank #423 · 5.9K reputationPosted Sep 19, 2013, 9:41 PM EDT
It will not work as zip.AddFile require physical path. not the virtual path. since https://dl.dropboxusercontent.com/u/155062858/flag.png is a virtual path therefore you are getting the error.
Regards,
Iftikar
Posted Sep 19, 2013, 9:42 PM EDT
You can download the file locally, compress and try it out.
Vasu GadhiyaRank #7,540 · 239 reputationPosted Sep 19, 2013, 10:33 PM EDT
Iftikar HussainRank #423 · 5.9K reputationPosted Sep 19, 2013, 10:38 PM EDT
Posted Sep 19, 2013, 10:46 PM EDT