We’re currently developing locally with serverless and we’re having trouble posting an image via API Gateway to the lambda proxy.
We’ve tried setting CONVERT_TO_TEXT on the request a la
events:
- http:
method: post
path: somePath/photo
request:
contentHandling: CONVERT_TO_TEXT
But it doesn’t come through the to the lambda as base64 which is what I was expecting. I’ve tried reading this into a buffer (we’re using nodejs) specifying base64, hex and utf-8 as the encoding but nothing seems to work.
So - is it possible to do this locally? If so, what am I doing wrong?
I did consider that I may need to specify which file types to treat as binary somewhere but I’m struggling to find much other than some plugins that were last touched 3 years ago and even they don’t seem to make a difference (I haven’t tried via a deployed API, only locally)