gitlab-org--gitlab-foss/app/uploaders/external_diff_uploader.rb
2019-02-05 14:12:48 +00:00

23 lines
391 B
Ruby

# frozen_string_literal: true
class ExternalDiffUploader < GitlabUploader
include ObjectStorage::Concern
storage_options Gitlab.config.external_diffs
alias_method :upload, :model
def filename
"diff-#{model.id}"
end
def store_dir
dynamic_segment
end
private
def dynamic_segment
File.join(model.model_name.plural, "mr-#{model.merge_request_id}")
end
end