From a78bcdaf38e1c75575ddb22f21575b2e811d02df Mon Sep 17 00:00:00 2001 From: Arjen Oosterkamp Date: Mon, 29 Aug 2011 10:46:31 +0200 Subject: [PATCH] Added .htc file content type to white list Added .htc file content type javascripts folder --- app/uploaders/theme_asset_uploader.rb | 2 +- lib/locomotive/carrierwave/asset.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/uploaders/theme_asset_uploader.rb b/app/uploaders/theme_asset_uploader.rb index 3d293586..965a3bdf 100644 --- a/app/uploaders/theme_asset_uploader.rb +++ b/app/uploaders/theme_asset_uploader.rb @@ -9,7 +9,7 @@ class ThemeAssetUploader < CarrierWave::Uploader::Base end def extension_white_list - %w(jpg jpeg gif png css js swf flv eot svg ttf woff otf ico) + %w(jpg jpeg gif png css js swf flv eot svg ttf woff otf ico htc) end def self.url_for(site, path) diff --git a/lib/locomotive/carrierwave/asset.rb b/lib/locomotive/carrierwave/asset.rb index 406801ea..92889660 100644 --- a/lib/locomotive/carrierwave/asset.rb +++ b/lib/locomotive/carrierwave/asset.rb @@ -21,7 +21,7 @@ module Locomotive :media => [/^video/, 'application/x-shockwave-flash', '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'], + :javascript => ['text/javascript', 'text/js', 'application/x-javascript', 'application/javascript', 'text/x-component'], :font => ['application/x-font-ttf', 'application/vnd.ms-fontobject', 'image/svg+xml', 'application/x-woff'] } end