Skip to content

Instantly share code, notes, and snippets.

@askehansen
Last active December 15, 2015 13:24
Show Gist options
  • Save askehansen/5266418 to your computer and use it in GitHub Desktop.
Save askehansen/5266418 to your computer and use it in GitHub Desktop.
Paperclip storage options
config.paperclip_defaults = {
storage: :s3,
bucket: "static.example.com",
s3_host_alias: "static.example.com",
s3_host_name: "s3-eu-west-1.amazonaws.com", # for european bucket
url: ":s3_alias_url",
path: ":attachment/:id/:style/:basename.:extension",
s3_headers: {
"Expires" => 10.years.from_now.httpdate
},
s3_credentials: {
access_key_id: "ACCESSKEY",
secret_access_key: "SECRET"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment