我尝试用Vimeo Api上传视频。我使用可恢复方法。第一步,我可以获取upload_link。但是第二步,我得到一个类似
的错误现有连接被远程主机强行关闭。
第二步代码如下。如果您能提供帮助,我将不胜感激。谢谢
string uploadLink = "upload_link";
WebClient webclient2 = new WebClient();
webclient2.Headers.Clear();
webclient2.Headers.Add("Tus-Resumable", "1.0.0");
webclient2.Headers.Add("Upload-Offset", "0");
webclient2.Headers.Add("Content-Type", "application/offset+octet-stream");
webclient2.Headers.Add("Accept", "application/vnd.vimeo.*+json;version=3.4");
var result = webclient2.UploadData(uploadLink, "PATCH", fileData);