Skip to content

Instantly share code, notes, and snippets.

@apaatsio
Created August 1, 2011 10:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apaatsio/1117883 to your computer and use it in GitHub Desktop.
Save apaatsio/1117883 to your computer and use it in GitHub Desktop.
S3 config for Paperclip
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