From f3d232381d60cbc93cb7a35285eb24c30cd0aba0 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 8 Dec 2019 15:37:12 +0100 Subject: Add `tootctl media remove-orphans` (#12568) --- config/initializers/paperclip.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/initializers') diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb index 96607b7ce..dadc492a0 100644 --- a/config/initializers/paperclip.rb +++ b/config/initializers/paperclip.rb @@ -89,7 +89,7 @@ else Paperclip::Attachment.default_options.merge!( storage: :filesystem, use_timestamp: true, - path: ENV.fetch('PAPERCLIP_ROOT_PATH', ':rails_root/public/system') + '/:class/:attachment/:id_partition/:style/:filename', + path: File.join(ENV.fetch('PAPERCLIP_ROOT_PATH', File.join(':rails_root', 'public', 'system')), ':class', ':attachment', ':id_partition', ':style', ':filename'), url: ENV.fetch('PAPERCLIP_ROOT_URL', '/system') + '/:class/:attachment/:id_partition/:style/:filename', ) end -- cgit From 17159625b3e2c6d94509c0c2879ca80efbac6846 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 10 Dec 2019 07:40:01 +0100 Subject: Add `S3_OVERRIDE_PATH_STYLE` environment variable (#12594) To support Exoscale --- config/initializers/paperclip.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/initializers') diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb index dadc492a0..5109baff7 100644 --- a/config/initializers/paperclip.rb +++ b/config/initializers/paperclip.rb @@ -52,7 +52,7 @@ if ENV['S3_ENABLED'] == 'true' if ENV.has_key?('S3_ENDPOINT') Paperclip::Attachment.default_options[:s3_options].merge!( endpoint: ENV['S3_ENDPOINT'], - force_path_style: true + force_path_style: ENV['S3_OVERRIDE_PATH_STYLE'] != 'true', ) Paperclip::Attachment.default_options[:url] = ':s3_path_url' -- cgit