Module: Locomotive::CarrierWave::Uploader::Asset::ClassMethods

Defined in:
lib/locomotive/carrierwave/asset.rb

Instance Method Summary collapse

Instance Method Details

#content_typesObject


18
19
20
21
22
23
24
25
26
27
# File 'lib/locomotive/carrierwave/asset.rb', line 18

def content_types
  {
    image:      ['image/jpeg', 'image/pjpeg', 'image/gif', 'image/png', 'image/x-png', 'image/jpg', 'image/x-icon', 'image/svg+xml'],
    media:      [/^video/, 'application/x-shockwave-flash', 'application/x-flash-video', 'application/x-swf', /^audio/, 'application/ogg', 'application/x-mp3'],
    pdf:        ['application/pdf', 'application/x-pdf'],
    stylesheet: ['text/css'],
    javascript: ['text/javascript', 'text/js', 'application/x-javascript', 'application/javascript', 'text/x-component', 'application/ecmascript'],
    font:       [/^application\/.*font/, 'application/x-font-ttf', 'application/vnd.ms-fontobject', 'application/x-woff', 'application/x-woff2', 'application/x-font-truetype', 'application/x-font-woff', 'application/x-font-woff2']
  }
end