0
0
Fork 0

Fix Cocaine::ExitStatusError when upload small non-animated GIF (#5489)

Looks like copied tempfile need to be flushed before further processing. This issue won't happen if the uploaded file has enough file size.
This commit is contained in:
unarist 2017-10-26 22:48:35 +09:00 committed by GitHub
parent 02f7f3619a
commit 4f337c020a
3 changed files with 21 additions and 11 deletions

View file

@ -10,6 +10,7 @@ module Paperclip
unless options[:style] == :original && num_frames > 1
tmp_file = Paperclip::TempfileFactory.new.generate(attachment.instance.file_file_name)
tmp_file << file.read
tmp_file.flush
return tmp_file
end