Page form with drop down. Modifications for Designs
This commit is contained in:
1 parent
27d47215e9
commit
c427e2af14
12 files changed
+118
-49
No files matched your search
@@ -1,6 +1,14 @@
|
||||
# encoding: utf-8
|
||||
|
||||
class AssetUploader < CarrierWave::Uploader::Base
|
||||
require 'mime/types'
|
||||
|
||||
process :set_content_type
|
||||
|
||||
def set_content_type(*args)
|
||||
content_type = file.content_type == 'binary/octet-stream' || 'application/octet-stream' || file.content_type.blank? ? MIME::Types.type_for(original_filename).first.to_s : file.content_type
|
||||
self.file.instance_variable_set(:@content_type, content_type)
|
||||
end
|
||||
|
||||
# Include RMagick or ImageScience support:
|
||||
# include CarrierWave::RMagick
|
||||
|
||||
Reference in new issue
Block a user