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

PUT method doesnt send file to server #34

Closed
is-blackhole opened this issue Oct 7, 2016 · 1 comment
Closed

PUT method doesnt send file to server #34

is-blackhole opened this issue Oct 7, 2016 · 1 comment

Comments

@is-blackhole
Copy link

Hello!

Just found small problem with file upload and existing model updates, which is sent with PUT request.

Looks like FormData with files need to passed with POST method only, PUT will send only filename and not the file body :( And according to SO discussions its a browsers (or standarts) limitation.
Forcing m.save(null, {method: 'POST'}) will send all data, just need to check model id on server to distinguish create/update.

Hope this will help somebody in future :)

@homeslicesolutions-zz
Copy link
Owner

Thanks for this as I will make sure that the README contains this restriction.

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

2 participants