1

I know how to upload single file to web server but my requirement is to upload multiple files to web server. I want to compress all the files and then want to upload the zip file to webserver.Now I have problem that how I can zip multiple files using GzipStream

  • down voter please provide explation –  May 24 '13 at 08:07
  • Gzipstream is not designed to handle multiple files, even though it should be possible somehow. Why don't you try a library which can handle more files? E.g. DotNetZip – jAC May 24 '13 at 08:16
  • Here you can find the [GzipStream](http://www.dotnetperls.com/gzipstream) example and after then you need to make a thread which will read your whole directory in which you are placing those uploaded files and then zip them one by one. – Freak May 24 '13 at 08:18
  • Thanks Janes and freak –  May 24 '13 at 08:21
  • @muski dont worry about those downvoters who didn't comment.They are just fulfilling their habit – Freak May 24 '13 at 08:24
  • @freak:you are absolutely right.I don't have privilege to vote a comment so that I can't give you vote. –  May 24 '13 at 08:34
  • @JanesAbouChleih DOtNetZip is support for Framweork2.0. is there any alternative for Framweork2.0?? – GaneshKumar Feb 27 '14 at 07:40

1 Answers1

0

GzipStream can allow only one file to zip and is only designed to hold a single file.Here you can find the GzipStream example and after then you need to make a thread which will read your whole directory in which you are placing those uploaded files and then zip them one by one.
Here in a question of stackoverflow and on msdn forum you can get a guess that how to compress multiple files using gzipstream.
Also DotNetZip also provide you very flexibility to zip multiple files

Community
  • 1
  • 1
Freak
  • 6,786
  • 5
  • 36
  • 54