Skip to content

Instantly share code, notes, and snippets.

@jhawthorn
Forked from peterberkenbosch/s3_assets_spree.rb
Last active August 29, 2015 14:05
Show Gist options
  • Save jhawthorn/608eb2bdcfd6b76c1d8c to your computer and use it in GitHub Desktop.
Save jhawthorn/608eb2bdcfd6b76c1d8c to your computer and use it in GitHub Desktop.
Spree::Image.attachment_definitions[:attachment].update(
s3_credentials: {
access_key_id: ENV['AWS_ACCESS_KEY_ID'],
secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'],
bucket: ENV['S3_BUCKET_NAME']
},
storage: :s3,
s3_headers: { "Cache-Control" => "max-age=31557600" },
s3_protocol: "https",
bucket: ENV['S3_BUCKET_NAME'],
url: ":s3_domain_url",
styles: {
mini: "48x48>",
small: "100x100>",
product: "240x240>",
large: "600x600>"
},
path: "/spree/:class/:id/:style/:basename.:extension",
default_url: "/spree/:class/:id/:style/:basename.:extension",
default_style: "product"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment