I have a page where i store images for each post and i store images in files using paperclip but i want to store it in the amazon s3 instead of storing it in folder. How can i do it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Let me try to explain it.
add
gem 'aws-sdk'to you gemfile. (don’t forget to bundle install)create a new file in
{APP FOLDER}/config/s3.ymlwith the following content:access_key_id: xxxxxYOUR_ACCESS_KEY_IDxxxxx
enter code heresecret_access_key: xxxxxYOUR_SECRET_ACCESS_KEYxxxxx
Update your model accordingly:
At last in your views:
Any issues let me know.
As for the alternatives to S3, Windows Azure Storage and Nimbus.io.