Answer the question
In order to leave comments, you need to log in
Vimeo API CORS problem with POST method?
Ajax request:
$.ajax({
url: uploadUrl,
data: formData,
cache: false,
contentType: false,
processData: false,
type: 'POST',
xhr: function () {
var myXhr = $.ajaxSettings.xhr();
if (myXhr.upload) {
myXhr.upload.addEventListener('progress', function (e) {
if (e.lengthComputable) {
$('progress').attr({
value: e.loaded,
max: e.total,
});
}
}, false);
}
return myXhr;
},
complete: function (response) {
window.location.href = "/тут_юрл_который_надо_для_завершения_закачки";
}
});
XMLHttpRequest cannot load
https://1511923755.cloud.vimeo.com/upload?ticket_id=f30af9126173c3ae4db3e27…token%253DoAnNVHIGKL5kn4lRTFi5P5pvva5cjCcwdsmegsAd33o2uxQckwBYGaXcUnJ1SaJ7.
//надо сюда перевести после запроса
Redirect from 'https://1511923755.cloud.vimeo.com/upload?ticket_id=f30af9126173c3ae4db3e27…token%253DoAnNVHIGKL5kn4lRTFi5P5pvva5cjCcwdsmegsAd33o2uxQckwBYGaXcUnJ1SaJ7'
to 'https://vimeo.com/upload/api?video_file_id=732166719&app_id=100418&ticket_i…3Ftoken%3DoAnNVHIGKL5kn4lRTFi5P5pvva5cjCcwdsmegsAd33o2uxQckwBYGaXcUnJ1SaJ7'
has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://musicians' is therefore not allowed access.
ticket_id:0dfbb06....db9a129773082
video_file_id:732096843
signature:4306bd26....50d7f6239
v6:1
// этот ЮРЛ, надо на него перевести, но как?
redirect_url:https://vimeo.com/upload/api?...
video_file_id=732096843&app_id=10041......wMN0QJGRtMpWoAjouzkdrY
Answer the question
In order to leave comments, you need to log in
as I understand it, the site to which you make an ajax request does not return a header with Access-Control-Allow-Origin
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question