Open ElectricPulse opened 1 month ago
From the top of my head, this should work without issues.
The body is encoded in base64 if you enable the binary data (inside AWS), ref: https://stackoverflow.com/a/41770688
Inside the lambda, you will need a lib to parse the form-data to actual data, with express-form-data for example.
In case it didn't work, case a repo with the reproduction and I can take a look
The issue ended up being that I used http and not https. Using HTTP returned a rather funny message of 404 status code with the body: Internal Server Error. This could be due to our CDK template, which I don't manage.
What are my options if I want to have a post request with a file attached with AWS? Ideally I want to use something like form-data but with express-form-data that doesn't seem to work.