youtube api upload “Cannot close stream until all bytes are written”

pspmodandcfw

New Member
I am using the youtube api to direct upload videos like this:\[code\] YouTubeRequestSettings setting = new YouTubeRequestSettings("devpa", key, "user", "pass"); YouTubeRequest req = new YouTubeRequest(setting); Video ytv = new Video(); ytv.Title = "test video1"; ytv.Tags.Add(new MediaCategory("Autos", YouTubeNameTable.CategorySchema)); ytv.Keywords = "test, dev"; ytv.Description = "this is a test video"; ytv.YouTubeEntry.Private = true; ytv.YouTubeEntry.MediaSource = new MediaFileSource(Server.MapPath("~/Static/User/progvideos/videos/red/mp4-test.mp4"), "video/mp4"); Video createdVideo = req.Upload(ytv);\[/code\]but every time i get this error:\[quote\] Cannot close stream until all bytes are written\[/quote\]even though i am uploading small videos and no matter what format the file has, what is the problem?thanks
 
Back
Top