Domanda

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

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top