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

Sending additional data with upload to server #23

Closed
saarangsoltani opened this issue Aug 1, 2014 · 5 comments
Closed

Sending additional data with upload to server #23

saarangsoltani opened this issue Aug 1, 2014 · 5 comments

Comments

@saarangsoltani
Copy link

it could be great to send additional data along with the upload post/put request to the server. Most jquery upload plugins support this.
Consider this as a proposal.

@digitaltoad
Copy link
Member

This is already possible. The second parameter of the upload method can be a literal which will be appended to the FormData object that is used in the POST/PUT.

@saarangsoltani
Copy link
Author

Thanks. This is missing in readme page

@digitaltoad
Copy link
Member

It was just added recently and the readme has not been updated. I'll get it updated when I get a chance.

@tibotiber
Copy link

Hi! Has the readme been updated now? I'm trying to use this as follow:

uploader.upload(files[0], {'foo':'bar'}).then(...)

but the FormData object is always empty (I logged it to check its content just before submitting return this._ajax(settings);) in your code.
Any idea? Thanks.

@digitaltoad
Copy link
Member

FormData cannot be inspected or logged per say. Check your server side instead.

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

3 participants