Amazon is not a free device; you must provide your credit card number in order to use it. However, you only pay for what you use, but it is not expensive. For example, for my websites last month I paid $ 2.46 for 15 GB of memory, and I paid $ 1.90 for 16 GB of data transfer.
To use S3 with paperclip, you need to add gem 'aws-s3' to the Gemfile
Then you need to add config/s3.yml credentials of your assets, for example:
production: access_key_id: AAAAAAAAAAAAAAAAAA secret_access_key: BBBBBBBBBBBBBBBBBBBBBBBBBBB bucket: assets.my-bucket
Then I have a model in which my assets are stored, for example:
class Asset has_attached_file :asset, :styles => { :thumb => "60x60#", :large => "700x330#"}, :storage => :s3, :s3_credentials => "#{Rails.root}/config/s3.yml", :path => "/images/:id/:style.:extension" validates_attachment_content_type :asset, :content_type => ['image/gif', 'image/jpeg', 'image/png', 'image/x-ms-bmp'] end
I hope this helps
CupraR_On_Rails
source share