So, oddly enough, I had this problem today, and none of the above solutions worked for me. I was getting this error:
`[paperclip] Content Type Spoof: Filename blah_blah_blah.mp3 (audio/mp3 from Headers, ["audio/mpeg"] from Extension), content type discovered from file command: application/octet-stream. See documentation to allow this combination.`
I solved this using this as my validator:
validates_attachment_content_type :recording, content_type: [ 'application/mp3', 'application/x-mp3', 'audio/mpeg', ['audio/mpeg'],
Hope this helps someone.
James milani
source share