The library seems to work very well when I use it to parse data from a form with only one part but I am experiencing issues when parsing data from a form with multiple parts.
E.g. if my form is submitted with the following payload (all payloads taken from hitting the endpoint via Postman):
But this is quite a significant change. Is there something am I missing in terms of some setup somewhere (in API Gateway for example) in order to get the current version working with multiple parts or is it a genuine issue?
The library seems to work very well when I use it to parse data from a form with only one part but I am experiencing issues when parsing data from a form with multiple parts.
E.g. if my form is submitted with the following payload (all payloads taken from hitting the endpoint via Postman):
then I get correctly get when parsing the
event
in my Lambda:If I submit with a file part and a boolean part like this:
then the result of parsing is:
The "preview" value is missing.
If I submit with only a "preview" value:
then I correctly get this back after parsing:
If I submit the "preview" parameter as the first part of the form and the file as the second then things get a bit weirder:
Result from parsing:
I can make the parsing work for all of the above cases if I change lines 10 and 11 from:
to
But this is quite a significant change. Is there something am I missing in terms of some setup somewhere (in API Gateway for example) in order to get the current version working with multiple parts or is it a genuine issue?
Cheers, Chris