I can upload video on folder but i cant compress it.
[HttpPost]
public HttpResponseMessage UploadFiles(){
//Create the Directory.
string path = HttpContext.Current.Server.MapPath("~/Video/");
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
//Fetch the File.
HttpPostedFile postedFile = HttpContext.Current.Request.Files[0];
//Fetch the File Name.
string fileName = HttpContext.Current.Request.Form["fileName"] + Path.GetExtension(postedFile.FileName);
//Save the File.
postedFile.SaveAs(path + fileName);
//Send OK Response to Client.
return Request.CreateResponse(HttpStatusCode.OK, fileName);
}
}

Pranam BhatRank #500 · 4.9K reputationPosted May 25, 2021, 3:06 AM EDT
selvi jpRank #4,123 · 364 reputationPosted May 25, 2021, 3:18 AM EDT
selvi jpRank #4,123 · 364 reputationPosted May 25, 2021, 4:51 AM EDT
Marvin ReidRank #1,963 · 746 reputationPosted Jun 7, 2021, 4:41 PM EDT