gitlab-org--gitlab-foss/app/uploaders/lfs_object_uploader.rb
Douwe Maan bc76062774 Merge branch 'jej/lfs-object-storage' into 'master'
Can migrate LFS objects to S3 style object storage

Closes #2841

See merge request !2760
2018-02-28 20:29:37 +01:00

18 lines
340 B
Ruby

class LfsObjectUploader < ObjectStoreUploader
storage_options Gitlab.config.lfs
after :store, :schedule_migration_to_object_storage
def self.local_store_path
Gitlab.config.lfs.storage_path
end
def filename
subject.oid[4..-1]
end
private
def default_path
"#{subject.oid[0, 2]}/#{subject.oid[2, 2]}"
end
end