You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Semenyk Dmitriy edited this page May 22, 2013
·
1 revision
If you need to save content type in your model, you could use this:
require'carrierwave/processing/mime_types'classMyUploader < CarrierWave::Uploader::BaseincludeCarrierWave::MimeTypesprocess:save_content_type_in_modeldefsave_content_type_in_model# replace `file_content_type` with your field namemodel.file_content_type=file.content_typeiffile.content_typeendend