Users Pricing

forum

Home Forums Compress a file while upload the file is possible in asp.net? – MindStick

Compress a file while upload the file is possible in asp.net?

Anonymous User 2378 20 Sep 2014

here i browsing a file and elect and that i clicking button to transfer currently the file ought to compress and will not be save in nothing format.as it is that if i transfer pdf it should be compress and save in a very folder as pdf format...please create this code on behalf of me...

protected void btnUpload_Click(object sender, EventArgs e)
   {
       if (fileUpload.HasFile)
       {
           string filename = Path.GetFileName(fileUpload.PostedFile.FileName);
           string path = Server.MapPath("~/SampleFiles/" + filename);
           fileUpload.SaveAs(path);
           lblTextMsg.Text = "File Uploaded Successfully.";
       }
   }


1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md