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

wireshark - USB mapping with python -

c++ - nodejs socket.io closes connection before upgrading to websocket -

Deploying Qt Application on Android is really slow? -