Click here to Skip to main content
15,888,322 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
I want to upload images,text files,videos,pdf ,excel files all with only one file uploader.
and also want to play video. and show that files in gridview.

What i use for that,javascript,jquery,or simply file upload?
Posted
Comments
sahabiswarup 20-Jan-14 0:55am    
have you tried anything? kindly share what you've tried till now then it is easy for all of us to show you the track.
ketan italiya 20-Jan-14 2:36am    
yes, i have use file upload for this i can easily upload images and other files but i can't upload videos.
sahabiswarup 20-Jan-14 2:40am    
in aspx page

<asp:FileUpload runat="server" ID="flup_Video_Path" >


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 <system.web> tag add the below code

<httpruntime executiontimeout="9999" maxrequestlength="2097151">

For more google this and you'll definitely find your solution.
ketan italiya 20-Jan-14 12:44pm    
thanks for your valuable reply

1 solution

Better you check file extension and code accordingly. As per extension you can show the respective icon also.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900