diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-29 14:20:15 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-29 14:20:15 +0100 |
commit | 5973ca3d111e65385299d47b6b82df48a0a5f67b (patch) | |
tree | ac25ce54ed921a0b6daad6626ad3f96eb6087490 /config | |
parent | cc70f28f195335f4775f7b6aafe7d90210e8b700 (diff) |
Upgrade Paperclip to 5, AWS-SDK to 2, do not generate medium/small versions of avatars
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/paperclip.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb index 643c5d384..80effc05e 100644 --- a/config/initializers/paperclip.rb +++ b/config/initializers/paperclip.rb @@ -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 |