Event object multipart/form data

Hi there,

I am sending the following body using a fetch to my function:

“body”: “------WebKitFormBoundary8r0PM8U0Nps7BJmm\r\nContent-Disposition: form-data; name=“public”\r\n\r\ntrue\r\n------WebKitFormBoundary8r0PM8U0Nps7BJmm\r\nContent-Disposition: form-data; name=“service”\r\n\r\nbubble\r\n------WebKitFormBoundary8r0PM8U0Nps7BJmm\r\nContent-Disposition: form-data; name=“contents”; filename=“Screenshot 2020-11-29 at 15.35.17.png”\r\nContent-Type: image/png\r\n\r\n\r\n------WebKitFormBoundary8r0PM8U0Nps7BJmm–\r\n”,

I get back:
body :LS0tLS0tV2ViS2l0Rm9ybUJvdW5kYXJ5OHIwUE04VTBOcHM3QkptbQ0KQ29udGVudC1EaXNwb3NpdGlvbjogZm9ybS1kYXRhOyBuYW1lPSJwdWJsaWMiDQoNCnRydWUNCi0tLS0tLVdlYktpdEZvcm1Cb3VuZGFyeThyMFBNOFUwTnBzN0JKbW0NCkNvbnRlbnQtRGlzcG9zaXRpb246IGZvcm0tZGF0YTsgbmFtZT0ic2VydmljZSINCg0KYnViYmxlDQotLS0tLS1XZWJLaXRGb3JtQm91bmRhcnk4cjBQTThVME5wczdCSm1tDQpDb250ZW50LURpc3Bvc2l0aW9uOiBmb3JtLWRhdGE7IG5hbWU9ImNvbnRlbnRzIjsgZmlsZW5hbWU9IlNjcmVlbnNob3QgMjAyMC0xMS0yOSBhdCAxNS4zNS4xNy5wbmciDQpDb250ZW50LVR5cGU6IGltYWdlL3BuZw0KDQoNCi0tLS0tLVdlYktpdEZvcm1Cb3VuZGFyeThyMFBNOFUwTnBzN0JKbW0tLQ0K

How can I convert that body back to what it was? I am sending it with content-type mutipart/form-data…

hi there, have you tried searching the forums for information on this?

I am not a specialist in this area, but it looks like we have some other posts that might be interesting for you to read through:

https://answers.netlify.com/search?q=multipart

Got any solution for that? Trouble with handling files in Netlify Function