From d3a62d263703142250d7d59335394a8e2a599ed4 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 22 Feb 2018 00:28:19 +0100 Subject: Fix #6525: Make sure file is opened in LazyThumbnail processor (#6529) --- lib/paperclip/lazy_thumbnail.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/paperclip') diff --git a/lib/paperclip/lazy_thumbnail.rb b/lib/paperclip/lazy_thumbnail.rb index 594f0ce39..42f9a557a 100644 --- a/lib/paperclip/lazy_thumbnail.rb +++ b/lib/paperclip/lazy_thumbnail.rb @@ -3,7 +3,7 @@ module Paperclip class LazyThumbnail < Paperclip::Thumbnail def make - return @file unless needs_convert? + return File.open(@file.path) unless needs_convert? Paperclip::Thumbnail.make(file, options, attachment) end -- cgit