ruby on rails 4 - Paperclip fails to upload mp3 files -


i'm trying upload audio files website. however, paperclip unable upload mp3 files try upload. reason though able upload wav files. have found similar problems none of answers have worked me. advice appreciated.

audio.rb

has_attached_file :audio validates_attachment_content_type :audio, content_type: ['application/mp3','application/x-mp3', 'audio/mpeg', ['audio/mpeg'], 'audio/mp3'] validates_attachment_size :audio, :less_than => 35.megabytes 

error

[paperclip] content type spoof: filename test.mp3 (binary/octet-stream headers, ["audio/mpeg"] extension), content type discovered  file command: audio/mpeg. see documentation allow combination. [paperclip] content type spoof: filename test.mp3 (binary/octet-stream headers, ["audio/mpeg"] extension), content type discovered file command: audio/mpeg. see documentation allow combination. (0.1ms)  rollback (0.1ms)  rollback 


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -