2016-08-18 14:31:44 +00:00
|
|
|
class GitlabUploader < CarrierWave::Uploader::Base
|
2017-02-23 21:54:25 +00:00
|
|
|
def self.base_dir
|
|
|
|
'uploads'
|
|
|
|
end
|
|
|
|
|
|
|
|
delegate :base_dir, to: :class
|
|
|
|
|
|
|
|
def file_storage?
|
|
|
|
self.class.storage == CarrierWave::Storage::File
|
|
|
|
end
|
|
|
|
|
2016-08-18 14:31:44 +00:00
|
|
|
# Reduce disk IO
|
|
|
|
def move_to_cache
|
|
|
|
true
|
|
|
|
end
|
|
|
|
|
|
|
|
# Reduce disk IO
|
|
|
|
def move_to_store
|
|
|
|
true
|
|
|
|
end
|
|
|
|
end
|