How can I add a MIME type for paperclip to use when saving foo_content_type to the db and when uploading to S3?
The below initializer does the job for intercepting the File#content_type provided by Paperclip::Upfile, but uploading epubs still results in them being saved in the db and on S3 as application/octet-stream.
How can I fix this?
Thanks,
John
MIME::Types.add MIME::Type.from_hash('Content-Type' => 'application/epub+zip',
'Extensions' => ['epub'])
MIME::Types.add MIME::Type.from_hash('Content-Type' => 'application/x-mobipocket-ebook',
'Extensions' => ['mobi'])