Overriding content_type for Rails Paperclip plugin
- by Fotios
I think I have a bit of a chicken and egg problem. I would like to set the content_type of a file uploaded via Paperclip. The problem is that the default content_type is only based on extension, but I'd like to base it on another module.
I seem to be able to set the content_type with the before_post_process
class Upload < ActiveRecord::Base …