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

21 lines
320 B
Ruby
Raw Normal View History

class LfsObjectUploader < GitlabUploader
extend Workhorse::UploadPath
include ObjectStorage::Concern
2015-10-12 10:42:14 -04:00
storage_options Gitlab.config.lfs
2015-10-12 10:42:14 -04:00
def filename
model.oid[4..-1]
2015-10-12 10:42:14 -04:00
end
def store_dir
dynamic_segment
end
private
def dynamic_segment
File.join(model.oid[0, 2], model.oid[2, 2])
end
2015-10-12 10:42:14 -04:00
end