hapi-lambda icon indicating copy to clipboard operation
hapi-lambda copied to clipboard

formdata image buffer upload format problem

Open Cybernetixs opened this issue 5 years ago • 0 comments

I have upload images to a Hapi 17 route as form data and its always worked fine. I recently migrated the server code to serverless using hapi-lambda and everything has been working fine EXCEPT for file uploads.

If I output the formData.image[data] I get a different result from the output of the Hapi 17 server vs the output of the hapi-lambda server for the same file upload.

The "sharp" image processing has always worked with the Hapi 17 upload, but it fails with hapi-lambda, saying "Input buffer contains unsupported image format.

Does something additional need to be added to the transformRequest or transformResponse ?

Cybernetixs avatar Feb 16 '20 14:02 Cybernetixs