* Fix #2108 - Fix gif uploads Add specs for media attachment gifv conversion * Add ffmpeg to travis * Make travis install ffmpeg, not libav * Switch travis to trusty
This commit is contained in:
parent
0876a06e45
commit
2e4afccd9d
5 changed files with 44 additions and 10 deletions
|
@ -7,7 +7,11 @@ module Paperclip
|
|||
def make
|
||||
num_frames = identify('-format %n :file', file: file.path).to_i
|
||||
|
||||
return file unless options[:style] == :original && num_frames > 1
|
||||
unless options[:style] == :original && num_frames > 1
|
||||
tmp_file = Paperclip::TempfileFactory.new.generate(attachment.instance.file_file_name)
|
||||
tmp_file << file.read
|
||||
return tmp_file
|
||||
end
|
||||
|
||||
final_file = Paperclip::Transcoder.make(file, options, attachment)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue