c# - ZIP all files and then download -


at first want convert files inside 1 folder .zip , download zipped folder using api , c#.

want access these files client side. client side i'm using angularjs , want download file server. put different- different logic not working.

try this

 public string mergefiles(string folder)     {         using (zipfile zip = new zipfile(folder))         {             string[] fileentries = directory.getfiles(folder);             foreach (string f in fileentries)             {                 string path = path.getdirectoryname(f.substring(folder.length));                     zip.addfile(f, path);             }             zip.save(folder + "\\files.zip");         }         return folder+"\\files.zip";     } 

Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -