I haven't really solved this issue, but here's my workaround.
I'm using two different uploaders within the same model, like this:
mount_uploader :media, MediaUploader # upload handler for video &
mount_uploader :image_media, ImageMediaUploader # upload handler for
Upon creation of the record via my controller I decide which uploader
to user, like this:
if mime_type.size >= 1 && mime_type.media_type.eql?("image") #
@media_asset.image_media = params[:Filedata]
else # video or audio
@media_asset.media = params[:Filedata]
params[:Filedata].content_type = mime_type.to_s
Its ugly and it would be better if this would be solved via the
Sometimes time does matter and I currently don't have the time to
implement a cleaner solution.
However I hope this helps you.