0
我想从我的网站上传Vimeo视频。我正在尝试使用此处描述的可恢复HTTP PUT上传:https://developer.vimeo.com/api/upload/videos。Vimeo Resumable(PUT)上传
我可以得到使用步骤3上传的视频。我通常甚至可以完成步骤5中显示的上传。但是,它建议在步骤4中验证上载。每次执行该请求时,都会收到308 Resume未完成错误。
我知道上传已完成,尤其是因为我可以完成上传。仅供参考,我使用Simple Ajax Uploader(https://www.lpology.com/code/ajaxuploader/docs.php)上传视频。
这里是我的代码:
// onComplete method for uploading the video using Simple Ajax Uploader
onComplete: function (filename, response) {
$.ajax({
url: self.uploadUrl.value,
method: 'PUT',
cache: false,
processData: false,
crossDomain: true,
headers: {
'Content-Range': 'bytes */*',
'X-Requested-With': 'XMLHttpRequest'
},
success: function (data, status) {
self.videoForm.submit();
console.log(data);
console.log(status);
},
error: function (xhr, status, error) {
console.log(xhr);
console.log(status);
console.log(error);
}
});
}