From 97349db8ffe255f3c30555bf9a79268bb33b8efb Mon Sep 17 00:00:00 2001 From: Nastia Gorokhova-Alekseeva Date: Mon, 20 Jun 2022 16:23:09 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BA=D0=B0=D1=87=D0=B8=D0=B2=D0=B0?= =?UTF-8?q?=D0=B5=D0=BC=20=D1=84=D0=B0=D0=B9=D0=BB=20=D0=B8=D0=B7=20S3,=20?= =?UTF-8?q?=D0=B8=D1=81=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D1=83=D1=8F=20=D0=B1?= =?UTF-8?q?=D0=B8=D0=B1=D0=BB=D0=B8=D0=BE=D1=82=D0=B5=D0=BA=D1=83,=20?= =?UTF-8?q?=D0=B0=20=D0=BD=D0=B5=20=D0=BF=D0=BE=20=D1=81=D1=81=D1=8B=D0=BB?= =?UTF-8?q?=D0=BA=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/paperclip/storage/no_cache_s3.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/paperclip/storage/no_cache_s3.rb b/lib/paperclip/storage/no_cache_s3.rb index f6c2617..4071d2a 100644 --- a/lib/paperclip/storage/no_cache_s3.rb +++ b/lib/paperclip/storage/no_cache_s3.rb @@ -93,10 +93,7 @@ module Paperclip return unless synced_to?(self.class.main_store_id) if self.class.download_by_url - # FIXME: do we need to escape here? - uri = URI(URI::DEFAULT_PARSER.escape(storage_url(style))) - response = Net::HTTP.get_response(uri) - create_tempfile(response.body) if response.is_a?(Net::HTTPOK) + create_tempfile(self.class.main_store_id.object(style_key).get.body.read) else download_from_store(self.class.main_store_id, style_key) end