-
Notifications
You must be signed in to change notification settings - Fork 265
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
Documentation for ajax does not mention FormData #1234
Comments
We added explicit support for binary AJAX data in jquery/jquery#4150 which will ship with jQuery 4.0. But yes, for FormData specifically, you can make it work in 3.x by disabling I agree it's worth documenting this. If you'd like to try, the AJAX page exists at https://github.com/jquery/api.jquery.com/blob/main/entries/jQuery.ajax.xml |
Somehow, any link to the CLA I found redirects to the OpenJS Foundation website or to https://openjsf.org/about/the-openjs-foundation-cla/, which still does not contain the actual content of the CLA. Anyhow, I am not sure if I will get around to this anytime soon, but if I find a quiet hour or so I might try to give it a go to write a starting point. |
But in any case thank you for the info about the changes for 4.x regarding this. Reading the discussion there and the referenced PR made me understand this a bit better. |
The page you linked to, https://openjsf.org/about/the-openjs-foundation-cla/, contains links to CLA for individual contributors, and a CLA for corporate contributors. Those are the documents you're looking for. |
It took me quite a while to find how to create an AJAX request with a fixed ordering of transferred arguments (even if the same name occurs multiple times) with a
multipart/form-data
encoding. I ended up posting a question to StackOverflow (https://stackoverflow.com/q/76545035/2240052) and found a related question with an answer that makes use of the following undocumented behavior of$.ajax
:data
parameter can be aFormData
objectcontentType
to false will in this case automatically create a correctcontentType
header including aboundary
specificationThis allowed me to solve my problem, but the documentation does not mention it and could be improved.
The text was updated successfully, but these errors were encountered: