mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-09-29 22:11:22 +00:00
Couldn't get the proxy object to work properly with XMLHTTPRequest's send method. Even though calls are being forwarded to its underlying FormData through the proxy, the request won't set its type to multipart/form-data when appropriate and instead send a text/plain request
This commit is contained in:
parent
2be7054525
commit
54381a2bf7
@ -3600,7 +3600,9 @@ var htmx = (function() {
|
||||
return encodedParameters
|
||||
} else {
|
||||
if (usesFormData(elt)) {
|
||||
return formDataFromObject(filteredParameters)
|
||||
// Force conversion to an actual FormData object in case filteredParameters is a formDataProxy
|
||||
// See https://github.com/bigskysoftware/htmx/issues/2317
|
||||
return overrideFormData(new FormData(), formDataFromObject(filteredParameters))
|
||||
} else {
|
||||
return urlEncode(filteredParameters)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user