Hello All,
I am trying to upload the video on you tube. i have created one function to upload the Video on you tube.
I am using fileupload control on design page. but i am unable to access the path of client so that i can pass this path
to my video upload function. i already gone throw many forums regarding this & i get that we can't get the client video
file path due to security reason. so how can i pass the path in to the function. code is given below....
01 | public string UploadVideo( string FilePath, string Title, string Description) |
07 | settings = new YouTubeRequestSettings( "Lakshya" , devkey, username, password) { Timeout = -1}; |
08 | request = new YouTubeRequest(settings); |
09 | Video newVideo = new Video(); |
10 | newVideo.Title = Title; |
11 | newVideo.Tags.Add( new MediaCategory( "Comedy" , YouTubeNameTable.CategorySchema)); |
12 | newVideo.Description = Description; |
13 | newVideo.Private = false ; |
14 | newVideo.YouTubeEntry.Private = false ; |
15 | newVideo.YouTubeEntry.MediaSource = new MediaFileSource(FilePath, "video/mp4" ); |
16 | Video createdVideo = request.Upload(newVideo); |
18 | return createdVideo.VideoId; |
How to pass the file path in to this function. i have fileupload control....?