Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- attachment_config = {
- 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",
- s3_region: ENV['AWS_REGION'],
- s3_host_name: ENV['AWS_ENDPOINT'],
- bucket: ENV["S3_BUCKET_NAME"],
- path: "app/:class/:attachment/:id/:style/:basename.:extension",
- default_url: "/:class/:attachment/:id/:style/:basename.:extension",
- default_style: "product",
- }
- attachment_config.each do |key, value|
- #Spree::Image.attachment_definitions[:attachment][key.to_sym] = value
- Paperclip::Attachment.default_options[key.to_sym] = value
- end
Add Comment
Please, Sign In to add comment