16 lines
317 B
Ruby
16 lines
317 B
Ruby
# encoding: utf-8
|
|
|
|
class ImageUploader < CarrierWave::Uploader::Base
|
|
include CarrierWaveDirect::Uploader
|
|
|
|
include CarrierWave::MimeTypes
|
|
process :set_content_type
|
|
storage :fog
|
|
|
|
# Add a white list of extensions which are allowed to be uploaded.
|
|
def extension_white_list
|
|
%w(jpg jpeg gif png)
|
|
end
|
|
|
|
end
|