diff options
author | Claire <claire.github-309c@sitedethib.com> | 2023-03-15 08:58:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-15 08:58:12 +0100 |
commit | 6a0ed45aa3f11f0343a7be556b36b4d075ba08df (patch) | |
tree | 0bbd3318c61cf062f17386f4da166864c9db8138 /config/initializers | |
parent | bb4e211c86270de6de8a78da96295208ee77dce1 (diff) | |
parent | 7f96391eaef601ea34672551bb06915acec7e492 (diff) |
Merge pull request #2122 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/paperclip.rb | 6 | ||||
-rw-r--r-- | config/initializers/redis.rb | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb index a2285427c..9282c941d 100644 --- a/config/initializers/paperclip.rb +++ b/config/initializers/paperclip.rb @@ -90,6 +90,12 @@ if ENV['S3_ENABLED'] == 'true' ) end + if ENV.has_key?('S3_STORAGE_CLASS') + Paperclip::Attachment.default_options[:s3_headers].merge!( + 'X-Amz-Storage-Class' => ENV['S3_STORAGE_CLASS'] + ) + end + # Some S3-compatible providers might not actually be compatible with some APIs # used by kt-paperclip, see https://github.com/mastodon/mastodon/issues/16822 if ENV['S3_FORCE_SINGLE_REQUEST'] == 'true' diff --git a/config/initializers/redis.rb b/config/initializers/redis.rb new file mode 100644 index 000000000..f2bbd1e45 --- /dev/null +++ b/config/initializers/redis.rb @@ -0,0 +1 @@ +Redis.sadd_returns_boolean = false |