Can someone share me a sample application , that has REST APIs to upload images to Amazon S3 . I've googled a lot , but most of them are not working as expected .
A little help would be greatly appreciated .
Can someone share me a sample application , that has REST APIs to upload images to Amazon S3 . I've googled a lot , but most of them are not working as expected .
A little help would be greatly appreciated .
For uploading images through API you can convert the images to base64 format in front end and send it to server. In, server you can convert the base64 data into the image and save it to
S3
viapaperclip
.Here,
picture_data
is a column inUser
table which has the base64 data received from the client through APIparams
.You can specify your own S3
URL
and path in above code.In the above code the
picture_data
that came from the client side is decoded and saved inS3
viaPaperclip
.