Custom Paperclip path.

This commit is contained in:
Valentin Lorentz 2017-04-03 16:32:34 +02:00
parent 663e5378c0
commit a0d569e2e2

View File

@ -38,4 +38,6 @@ if ENV['S3_ENABLED'] == 'true'
Paperclip::Attachment.default_options[:url] = ':s3_alias_url'
Paperclip::Attachment.default_options[:s3_host_alias] = ENV['S3_CLOUDFRONT_HOST']
end
else
Paperclip::Attachment.default_options[:path] = (ENV['PAPERCLIP_ROOT'] || ':rails_root/public/system') + '/:class/:attachment/:id_partition/:style/:filename'
end