Created
August 1, 2011 10:02
-
-
Save apaatsio/1117883 to your computer and use it in GitHub Desktop.
S3 config for Paperclip
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Photo < ActiveRecord::Base | |
has_attached_file :image, | |
:styles => { | |
:thumb => '100x100', | |
:large => '640x480', | |
}, | |
:storage => :s3, | |
:s3_credentials => "#{::Rails.root.to_s}/config/s3.yml", | |
:path => ':attachment/:id/:style.:extension', | |
:bucket => 'my-bucket', | |
:s3_options => { | |
:server => 's3.amazonaws.com' | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment