debian-mirror-gitlab/app/uploaders/namespace_file_uploader.rb
2018-03-17 18:26:18 +05:30

19 lines
369 B
Ruby

class NamespaceFileUploader < FileUploader
# Re-Override
def self.root
options.storage_path
end
def self.base_dir(model)
File.join(options.base_dir, 'namespace', model_path_segment(model))
end
def self.model_path_segment(model)
File.join(model.id.to_s)
end
# Re-Override
def store_dir
File.join(base_dir, dynamic_segment)
end
end