Sir I am developing a institution website where requirement is to upload and download images,pdfs and videos.I have done it for images and videos but unable to do so for videos.Please help me.
Thanks in advance
How can i upload a video on server using C# in Asp.net
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.


Sanjeeb LenkaRank #301 · 8.3K reputationPosted Jun 11, 2013, 11:14 PM EDT
in aspx page
in code
if (flup_Video_Path.HasFile)
{
string fileName_Vdo = Path.GetFileNameWithoutExtension(Guid.NewGuid().ToString() + "_" + flup_Video_Path.FileName).ToString() + Path.GetExtension(flup_Video_Path.FileName).ToString(); flup_Video_Path.SaveAs(Server.MapPath("~/Uploads/video/") + fileName_Vdo); }
in database store the path.
Main thing fileupload control default file size is 4mb if you
upload more than 4mb
it will not take that . so you have to change it in web.config
within
you can increase or decrease the maxRequestLength according
to your requirement