Merge pull request #40 from insales/typo_in_style

В style лежит символ, а не строка
This commit is contained in:
Nastia
2021-12-08 17:11:02 +03:00
committed by GitHub

View File

@@ -196,7 +196,7 @@ module Paperclip
end
paths.each do |style, file|
log("saving to s3 #{file}")
content_type = style == 'original' ? instance_read(:content_type) : file_content_type(file)
content_type = style == :original ? instance_read(:content_type) : file_content_type(file)
s3_object = self.class.aws_bucket.object(s3_path(style))
s3_object.upload_file(file,
cache_control: "max-age=#{10.year.to_i}",
@@ -217,7 +217,7 @@ module Paperclip
end
paths.each do |style, file|
log("saving to yandex #{file}")
content_type = style == 'original' ? instance_read(:content_type) : file_content_type(file)
content_type = style == :original ? instance_read(:content_type) : file_content_type(file)
s3_object = self.class.yandex_bucket.object(s3_path(style))
s3_object.upload_file(file,
cache_control: "max-age=#{10.year.to_i}",
@@ -238,7 +238,7 @@ module Paperclip
end
paths.each do |style, file|
log("saving to sbercloud #{file}")
content_type = style == 'original' ? instance_read(:content_type) : file_content_type(file)
content_type = style == :original ? instance_read(:content_type) : file_content_type(file)
s3_object = self.class.sbercloud_bucket.object(s3_path(style))
s3_object.upload_file(file,
cache_control: "max-age=#{10.year.to_i}",