I am using Paperclip , and paperclip-ffmpeg for processing uploads. Below is my code
class Asset < ActiveRecord::Base
belongs_to :profile
has_attached_file :photo, :styles => {
:mobile => {:geometry => "400x300", :format => 'mp4', :streaming => true}
}, :processors => [:ffmpeg]
validates_attachment_content_type :photo, :content_type => ['image/jpeg', 'image/png', 'image/gif', 'application/msword', 'application/pdf', 'video/x-flv']
end
when i upload image or video file then it is working properly. But when i upload PDF or doc
file, this error occurs.
"uninitialized constant Paperclip::Error"
Any help??
Or How i can put if condition validation if upload file is PDF or Doc. Then i can skip this
below code. Because this is cause of error when file type is PDF or Doc.
":styles => {
:mobile => {:geometry => "400x300", :format => 'mp4', :streaming => true}
}, :processors => [:ffmpeg]"
Thanks