From 50d85f77a2663afc39f71edb6b50a11175b4cf77 Mon Sep 17 00:00:00 2001 From: Nastia Gorokhova-Alekseeva Date: Wed, 8 Dec 2021 17:09:56 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=20style=20=D0=BB=D0=B5=D0=B6=D0=B8=D1=82?= =?UTF-8?q?=20=D1=81=D0=B8=D0=BC=D0=B2=D0=BE=D0=BB,=20=D0=B0=20=D0=BD?= =?UTF-8?q?=D0=B5=20=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/paperclip/storage/delayeds3.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/paperclip/storage/delayeds3.rb b/lib/paperclip/storage/delayeds3.rb index 2016a0c..0276406 100644 --- a/lib/paperclip/storage/delayeds3.rb +++ b/lib/paperclip/storage/delayeds3.rb @@ -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}",