上传视频时出现回形针错误:无法转储文件

时间:2014-06-13 09:20:17

标签: ruby-on-rails video paperclip

当我尝试使用Paperclip上传视频时,收到错误消息can't dump File

模型Video

class Video < ActiveRecord::Base
has_attached_file :avatar,
   :storage => :s3,
   :styles => {
     :mp4 => { :geometry => "640x480", :format => 'mp4' },
     :thumb => { :geometry => "300x300>", :format => 'jpg', :time => 5 }
   }, :processors => [:ffmpeg]

  validates_attachment_presence :avatar

  validates_attachment_content_type :avatar,
   :content_type => /video/,
   :message => "Video not supported"

end

0 个答案:

没有答案