]> cat aescling's git repositories - mastodon.git/commitdiff
Cast multipart threshold to integer (#11944)
authorYamagishi Kazutoshi <ykzts@desire.sh>
Tue, 24 Sep 2019 15:32:12 +0000 (00:32 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Tue, 24 Sep 2019 15:32:12 +0000 (17:32 +0200)
config/initializers/paperclip.rb

index cfc95330cc752b7120645d9b99a54af70bd87141..f308c284115e1da27c9a88038713b9aad04abc62 100644 (file)
@@ -25,7 +25,7 @@ if ENV['S3_ENABLED'] == 'true'
     s3_protocol: s3_protocol,
     s3_host_name: s3_hostname,
     s3_headers: {
-      'X-Amz-Multipart-Threshold' => ENV.fetch('S3_MULTIPART_THRESHOLD') { 15.megabytes },
+      'X-Amz-Multipart-Threshold' => ENV.fetch('S3_MULTIPART_THRESHOLD') { 15.megabytes }.to_i,
       'Cache-Control' => 'public, max-age=315576000, immutable',
     },
     s3_permissions: ENV.fetch('S3_PERMISSION') { 'public-read' },