Let me first explain what i am after. I want to Uploade a LARGE file, Several of gigs, so i DO NOT want to uploade the entire to memory and then write it physicially to the hdd.
I also want the target file to be zipped.
what i have tried to do is
FileUpload FileUpload1 = (FileUpload)LoginView1.FindControl("FileUpload1");
string targetName = "C:\\Uploads\\" + new FileInfo(FileUpload1.PostedFile.FileName).Name;
int numberOFExten = targetName.LastIndexOf('.');
targetName = targetName.Remove(numberOFExten);
targetName = targetName + ".zip";
using (FileStream target = new FileStream(targetName,FileMode.Create,FileAccess.Write))
using (GZipStream alg = new GZipStream(target, CompressionMode.Compress))
View Complete Post