about summary refs log tree commit diff
path: root/lib/paperclip
diff options
context:
space:
mode:
authorunarist <m.unarist@gmail.com>2017-10-26 22:48:35 +0900
committerGitHub <noreply@github.com>2017-10-26 22:48:35 +0900
commit4f337c020a7ca7a77086af5021c9c152fa1f07fc (patch)
tree02a9e15905b981712e9dc056123f760b42e21065 /lib/paperclip
parent02f7f3619a2af35ec29aface76bd6b5ba0f1a725 (diff)
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.
Diffstat (limited to 'lib/paperclip')
-rw-r--r--lib/paperclip/gif_transcoder.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/paperclip/gif_transcoder.rb b/lib/paperclip/gif_transcoder.rb
index cbe53b27b..629e37581 100644
--- a/lib/paperclip/gif_transcoder.rb
+++ b/lib/paperclip/gif_transcoder.rb
@@ -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