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);
}
});
}