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

Fix #1841 sails upload error #1842

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

elesdoar
Copy link

@elesdoar elesdoar commented Jan 19, 2017

@danialfarid
Copy link
Owner

Could you elaborate more.

@elesdoar
Copy link
Author

elesdoar commented Mar 3, 2017

Sails requires that ng-upload send any text parameter before that multipart data.

It is important to realize that the benefit above relies on a crucial, simplifying assumption: that user agents send any text parameters before the first file parameter in the multipart HTTP request body. For instance, in an HTML form that means putting all of your tags after the other inputs. If you don't want to lay your form out that way, you'll want to use AJAX to submit it instead (see jQuery File Upload / Angular File Upload) or listen for the form's "submit" event to reorder the inputs before submitting the form to the server.

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

Successfully merging this pull request may close these issues.

2 participants