BigW Consortium Gitlab

lfs_object_uploader.rb 361 Bytes
Newer Older
1
class LfsObjectUploader < GitlabUploader
2 3 4
  storage :file

  def store_dir
5
    "#{Gitlab.config.lfs.storage_path}/#{model.oid[0, 2]}/#{model.oid[2, 2]}"
6 7 8 9 10 11 12 13 14
  end

  def cache_dir
    "#{Gitlab.config.lfs.storage_path}/tmp/cache"
  end

  def filename
    model.oid[4..-1]
  end
15 16 17 18

  def work_dir
    File.join(Gitlab.config.lfs.storage_path, 'tmp', 'work')
  end
19
end