我正在使用 youtube api 直接上传这样的视频:
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("PATH"), "video/mp4");
Video createdVideo = req.Upload(ytv);
但每次我得到这个错误:
在写入所有字节之前无法关闭流
即使 *我正在上传具有不同灭绝 (flv,mp4 ..etc) *的小视频,有什么问题?
谢谢