当我尝试在回形针-ffmpeg 中上传 .mov 视频时,会出现错误
Video content type is invalid in paperclip-ffmpeg
我的代码是
has_attached_file :video, :styles => {
:medium => { :geometry => "640x480", :format => 'webm' }
}, :processors => [:ffmpeg]
validates_attachment_size :video, :less_than => 100.megabytes
validates_attachment_presence :video
validates_attachment_content_type :video, :content_type => ["video/mov"]
最佳答案
您应该使用 video/quicktime
作为 mimetype。在此处查看视频模仿类型列表:
http://help.encoding.com/knowledge-base/article/correct-mime-types-for-serving-video-files/
关于ruby-on-rails - 回形针-ffmpeg 中的视频内容类型无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33864604/