Closed guigaoliveira closed 3 years ago
This is expected because we don't support json in multipart. :) How are users sending json encoded multipart? It would be good to know to decide if this is something we should support officially.
Ah, check this out: https://github.com/elixir-plug/plug/blob/master/lib/plug/parsers/multipart.ex#L35
You can provide a custom function to handle those headers in master. :) So give master a try!
How are users sending json encoded multipart?
@josevalim I've thought about this form to be submitted using FormData api in front-end, making an asynchronous request, then this field as a json makes sense to me, because Í can centrelize data about "location", but now I remove "location" field and create a "latitude" and "longitude" on form-data.
Hello, I'm trying to send a image and fields with multipart/form-data, one of these fields has type json. Plug is not parsing json field as expected. The curl code of request I have sent is:
Plug parses this and puts it in parameters like:
What I expected: