Class: LfsObjectUploader

Inherits:
CarrierWave::Uploader::Base
  • Object
show all
Defined in:
app/uploaders/lfs_object_uploader.rb

Instance Method Summary collapse

Instance Method Details

#cache_dirObject


10
11
12
# File 'app/uploaders/lfs_object_uploader.rb', line 10

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

#exists?Boolean

Returns:

  • (Boolean)

22
23
24
# File 'app/uploaders/lfs_object_uploader.rb', line 22

def exists?
  file.try(:exists?)
end

#filenameObject


26
27
28
# File 'app/uploaders/lfs_object_uploader.rb', line 26

def filename
  model.oid[4..-1]
end

#move_to_cacheObject


14
15
16
# File 'app/uploaders/lfs_object_uploader.rb', line 14

def move_to_cache
  true
end

#move_to_storeObject


18
19
20
# File 'app/uploaders/lfs_object_uploader.rb', line 18

def move_to_store
  true
end

#store_dirObject


6
7
8
# File 'app/uploaders/lfs_object_uploader.rb', line 6

def store_dir
  "#{Gitlab.config.lfs.storage_path}/#{model.oid[0,2]}/#{model.oid[2,2]}"
end