2017-09-07 21:27:04 +00:00
|
|
|
class LfsObjectUploader < ObjectStoreUploader
|
|
|
|
storage_options Gitlab.config.lfs
|
|
|
|
after :store, :schedule_migration_to_object_storage
|
2015-10-12 14:42:14 +00:00
|
|
|
|
2017-09-07 21:27:04 +00:00
|
|
|
def self.local_store_path
|
|
|
|
Gitlab.config.lfs.storage_path
|
2015-10-12 14:42:14 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def filename
|
2017-09-07 21:27:04 +00:00
|
|
|
subject.oid[4..-1]
|
2015-10-12 14:42:14 +00:00
|
|
|
end
|
2017-06-01 20:15:46 +00:00
|
|
|
|
2017-09-07 21:27:04 +00:00
|
|
|
private
|
|
|
|
|
|
|
|
def default_path
|
|
|
|
"#{subject.oid[0, 2]}/#{subject.oid[2, 2]}"
|
2017-06-01 20:15:46 +00:00
|
|
|
end
|
2015-10-12 14:42:14 +00:00
|
|
|
end
|