gitlab-org--gitlab-foss/app/uploaders/lfs_object_uploader.rb

20 lines
322 B
Ruby
Raw Normal View History

2016-08-18 10:31:44 -04:00
class LfsObjectUploader < GitlabUploader
2015-10-12 10:42:14 -04:00
storage :file
def store_dir
"#{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 exists?
file.try(:exists?)
end
def filename
model.oid[4..-1]
end
end