Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

2.5.1 broke POST upload file #147

Closed
seymores opened this issue Aug 25, 2016 · 5 comments
Closed

2.5.1 broke POST upload file #147

seymores opened this issue Aug 25, 2016 · 5 comments

Comments

@seymores
Copy link

seymores commented Aug 25, 2016

Upgraded to latest ember 2.7 and ember-ajax to 2.5.1.
Immediately the file upload is not working anymore.

Error message seen in the console was missing 'Access-Control-Allow-Origin'.
Checked with previous version and sure enough 'Access-Control-Allow-Origin' was sent out in the request header but not in the latest 2.5.1.

Is there a config change to contentType that effects the missing 'Access-Control-Allow-Origin'?
We were using 'multipart/form' and the latest version doesn't seems to support multipart/form?

@alexlafroscia
Copy link
Collaborator

alexlafroscia commented Aug 25, 2016

Hmm, I'll have to check it out. In the meantime, if you want to help speed a fix along, submitting a PR with a failing test case will really help me get this done quickly!

@lifeart
Copy link

lifeart commented Aug 25, 2016

Same Err, but because multipart/form-data; now not default

With opts:
processData: false,
contentType: false,

Post request shuld has ContentType: multipart/form-data; boundary=--- {some boundary},
but now it application/x-www-form-urlencoded; charset=UTF-8

I think this is -> #144

@jrowlingson
Copy link
Contributor

@lifeart correct - the fix is on master

@alexlafroscia
Copy link
Collaborator

alexlafroscia commented Aug 26, 2016

@jrowlingson @lifeart So cutting a new 2.5.2 release is all we need? That's an easy fix 😉

kevinansfield added a commit to kevinansfield/Ghost-Admin that referenced this issue Oct 3, 2016
no issue
- pin `ember-ajax` on a version that contains related fixes (ember-cli/ember-ajax#147)
- update our `ajax` service so that it defaults to `application/json` content-type rather than forcing it
acburdine pushed a commit to TryGhost/Admin that referenced this issue Oct 3, 2016
no issue
- pin `ember-ajax` on a version that contains related fixes (ember-cli/ember-ajax#147)
- update our `ajax` service so that it defaults to `application/json` content-type rather than forcing it
@jherdman
Copy link
Collaborator

2.5.2 is released, and I can verify that it's resolved the issue.

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

No branches or pull requests

5 participants