Skip to content

Instantly share code, notes, and snippets.

View Kunallfc's full-sized avatar

Kunal Kunallfc

  • New Delhi
View GitHub Profile
@Kunallfc
Kunallfc / upload-images-s3-sdk-ruby
Created October 6, 2017 10:41 — forked from Bijendra/upload-images-s3-sdk-ruby
Upload images to AWS S3 in rails application using aws-sdk
Using gem aws-sdk for a ror application for uploading images to s3
Uploading images to a fixed bucket with different folders for each object or application.
The s3 keeps a limitation on the number of buckets creattion whereas there is no
limitation for content inside a bucket.
This code will upload image for a user to s3 using aws-sdk gem. The bucket and the image uploaded are made public
so that the images uploaded are directly accessible. The input it takes is the image complete path
where it is present, folder in which it should be uploaded and user_id for whom it should
be uploaded.