0
0
Fork 0

Upgrade Paperclip to 5, AWS-SDK to 2, do not generate medium/small versions of avatars

This commit is contained in:
Eugen Rochko 2016-11-29 14:20:15 +01:00
parent cc70f28f19
commit 5973ca3d11
6 changed files with 33 additions and 20 deletions

View file

@ -1,4 +1,6 @@
if ENV['S3_ENABLED'] == 'true'
Aws.eager_autoload!(services: %w(S3))
Paperclip::Attachment.default_options[:storage] = :s3
Paperclip::Attachment.default_options[:s3_protocol] = 'https'
Paperclip::Attachment.default_options[:url] = ':s3_domain_url'
@ -9,6 +11,6 @@ if ENV['S3_ENABLED'] == 'true'
bucket: ENV.fetch('S3_BUCKET'),
access_key_id: ENV.fetch('AWS_ACCESS_KEY_ID'),
secret_access_key: ENV.fetch('AWS_SECRET_ACCESS_KEY'),
s3_region: ENV.fetch('S3_REGION')
s3_region: ENV.fetch('S3_REGION'),
}
end