2016-08-18 10:31:44 -04:00
|
|
|
class LfsObjectUploader < GitlabUploader
|
2015-10-12 10:42:14 -04:00
|
|
|
storage :file
|
|
|
|
|
|
|
|
def store_dir
|
2016-06-29 09:23:44 -04:00
|
|
|
"#{Gitlab.config.lfs.storage_path}/#{model.oid[0, 2]}/#{model.oid[2, 2]}"
|
2015-10-12 10:42:14 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def cache_dir
|
|
|
|
"#{Gitlab.config.lfs.storage_path}/tmp/cache"
|
|
|
|
end
|
|
|
|
|
|
|
|
def filename
|
|
|
|
model.oid[4..-1]
|
|
|
|
end
|
2017-06-01 16:15:46 -04:00
|
|
|
|
|
|
|
def work_dir
|
|
|
|
File.join(Gitlab.config.lfs.storage_path, 'tmp', 'work')
|
|
|
|
end
|
2015-10-12 10:42:14 -04:00
|
|
|
end
|