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
Adam Jahn edited this page Apr 14, 2017
·
2 revisions
If you need to save content type in your model, you could use this:
require'carrierwave/processing/mime_types'classMyUploader < CarrierWave::Uploader::Base# include CarrierWave::MimeTypes# ^ Include MimeTypes for CarrierWave versions < 1.0.0process: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