debian-mirror-gitlab/app/uploaders/lfs_object_uploader.rb
2023-05-27 22:25:52 +05:30

24 lines
369 B
Ruby

# frozen_string_literal: true
class LfsObjectUploader < GitlabUploader
extend Workhorse::UploadPath
include ObjectStorage::Concern
storage_location :lfs
alias_method :upload, :model
def filename
model.oid[4..]
end
def store_dir
dynamic_segment
end
private
def dynamic_segment
File.join(model.oid[0, 2], model.oid[2, 2])
end
end