Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video successfully uploaded when use ajax post method but CORS policy error show! #125

Open
hunglas opened this issue Feb 18, 2020 · 0 comments

Comments

@hunglas
Copy link

hunglas commented Feb 18, 2020

I am using "form-based approach" follow steps:

  1. I created a video via POST method from server (success)
  2. Get upload_link from step 1 and use it for ajax post method but I got error even video had successfully uploaded to Vimeo:
    image

Can some body help me to understand how can successfully uploaded video like this way without error like this? Thanks so much!

Ajax Post code:

var formData = new FormData(form);
formData.append("file_data", file);
$.ajax({
'url': uploadLink,
'type': 'POST',
'method': 'POST',
'dataType': 'multipart/form-data',
'data': formData,
'contentType': false,
'processData': false,
'cache': false,
}).done(function(data) {
console.log('final', data);
}).fail(function(err){
console.log('error', err);
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant