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:
parent
02f7f3619a
commit
4f337c020a
3 changed files with 21 additions and 11 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue