Guest User

Untitled

a guest
Dec 18th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. attachment_config = {
  2. s3_credentials: {
  3. access_key_id: ENV["AWS_ACCESS_KEY_ID"],
  4. secret_access_key: ENV["AWS_SECRET_ACCESS_KEY"],
  5. bucket: ENV["S3_BUCKET_NAME"],
  6. },
  7.  
  8. storage: :s3,
  9. s3_headers: { "Cache-Control" => "max-age=31557600" },
  10. s3_protocol: "https",
  11. s3_region: ENV['AWS_REGION'],
  12. s3_host_name: ENV['AWS_ENDPOINT'],
  13. bucket: ENV["S3_BUCKET_NAME"],
  14.  
  15. path: "app/:class/:attachment/:id/:style/:basename.:extension",
  16. default_url: "/:class/:attachment/:id/:style/:basename.:extension",
  17. default_style: "product",
  18. }
  19.  
  20. attachment_config.each do |key, value|
  21. #Spree::Image.attachment_definitions[:attachment][key.to_sym] = value
  22. Paperclip::Attachment.default_options[key.to_sym] = value
  23. end
Add Comment
Please, Sign In to add comment