Browse Source

Improve S3 config

closed-social-glitch-2
Eugen Rochko 7 years ago
parent
commit
45230c56ab
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      config/initializers/paperclip.rb

+ 3
- 0
config/initializers/paperclip.rb View File

@ -7,4 +7,7 @@ if ENV['S3_ENABLED'] == 'true'
secret_access_key: ENV.fetch('AWS_SECRET_ACCESS_KEY'),
s3_region: ENV.fetch('S3_REGION')
}
Paperclip::Attachment.default_options[:url] = ':s3_domain_url'
Paperclip::Attachment.default_options[:path] = '/:class/:attachment/:id_partition/:style/:filename'
end

Loading…
Cancel
Save