Class: CarrierWave::SanitizedFile

Inherits:
Object
  • Object
show all
Defined in:
card-mod-carrierwave/lib/carrier_wave/file_card_uploader.rb

Instance Method Summary collapse

Instance Method Details

#content_typeObject



244
245
246
247
248
249
250
251
252
253
# File 'card-mod-carrierwave/lib/carrier_wave/file_card_uploader.rb', line 244

def content_type
  # the original content_type method doesn't seem to be very reliable
  # It uses mime_magic_content_type  - which returns invalid/invalid for css files
  # that start with a comment - as the second option.  (we switch the order and
  # use it as the third option)
  @content_type ||=
    existing_content_type ||
    mini_mime_content_type ||
    mime_magic_content_type
end