0

From my web page,i just want to browse a video file and then get its full path,so that i can use the path to stream the video file through VLC ,using the command line process.

For this purpose i dropped a file type control into my web page.

After selecting a file,when i check the value of the input field.Then i am only getting the name of the File

i.e If i select a file from my desktop named 1.mov, then the location showed in the default text box with the input file type is C:\Users\xx\Desktop\1.mov

But when i check the value of the input field then it only gives the name of the video file i.e 1.mov

Can anyone give me a suitable work around for this or may be some other way to get the full path of the selected file.

Any help will be appreciated.

Thanks.

Vipin Nair
  • 517
  • 4
  • 9
  • 33
  • Maybe... http://stackoverflow.com/questions/4176377/how-to-get-the-full-path-of-the-file-from-a-file-input – Mate Nov 30 '12 at 04:17
  • But thats stating that there is no way of getting the full path.Is there any other work around? – Vipin Nair Nov 30 '12 at 04:18
  • You may need this file upload at your end and then you can stream this video form your file location. – gofor.net Nov 30 '12 at 04:19
  • But can i upload a file of say 2 gb using the file upload control.I know its possible by changing some lines in config file,but being a newbie in this i dnt know much abt it.Can u help me with that – Vipin Nair Nov 30 '12 at 04:22

1 Answers1

1

You Must have to Upload file on server first, then u can get root path using following method,

Server.MapPath("~"):It returns the physical path to the root of the application.

Gayatri
  • 274
  • 1
  • 4
  • 17
  • Is this the only way ? Or is there any other work around posible. Also i have the reuirements of streaming huge files say of 2 gb size.So uploading that big file to server,whether is permitted thru File upload control? – Vipin Nair Nov 30 '12 at 04:31
  • sorry but i never tried to upload huge files.and about path as per my knowledge u cant get the path of file before upload it . – Gayatri Nov 30 '12 at 04:35
  • Okay thanks gayathri i will try it and update you.Thanks for the fast reply. :) – Vipin Nair Nov 30 '12 at 04:35
  • Do u know about registering a client side script in c# – Vipin Nair Nov 30 '12 at 04:46
  • Hi gayathri,thanks for the help ,i tried it the way you said and got it working,but need to find a way of uploading big video files using fileupload. – Vipin Nair Nov 30 '12 at 05:59