How can I upload image to s3 with Multer buffer?

Viewed 770

I'm using the Multer library to upload an image. So, I use ReactJS to upload the file to the NodeJS server. In the NodeJS server, I received a piece of image information sent from the client as this picture.

enter image description here

In the s3 upload function, I use the buffer value in this picture as a body. I uploaded it to s3 successfully but when I open the image URL, it shows me like this picture.

enter image description here

There's any suggestion or correct way to upload an image to S3.

1 Answers
Related