Skip to content

Instantly share code, notes, and snippets.

@kevinpfromnm
Created June 30, 2011 04:39
Show Gist options
  • Save kevinpfromnm/1055647 to your computer and use it in GitHub Desktop.
Save kevinpfromnm/1055647 to your computer and use it in GitHub Desktop.
example of s3 configured paperclip attachment
has_attached_file :image,
:styles => {
:original => ["1000x1000", :jpg ],
:medium => ["500x800", :jpg ],
:small => ["300x500", :jpg ],
:thumbnail => ["100x100#", :jpg ]
},
:default_style => :medium,
:storage => :s3,
:path => ":style/:id_:basename.:extension",
:s3_credentials => S3_KEYS,
:s3_headers => {'Expires' => 10.year.from_now.httpdate},
:bucket => 'app-name-uploads'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment