summaryrefslogtreecommitdiff
path: root/app/uploaders/legacy_artifact_uploader.rb
blob: 28c458d3ff17cbcbc16fb2ccbd19db773344a7b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class LegacyArtifactUploader < GitlabUploader
  extend Workhorse::UploadPath

  storage_options Gitlab.config.artifacts

  def store_dir
    dynamic_segment
  end

  private

  def dynamic_segment
    File.join(model.created_at.utc.strftime('%Y_%m'), model.project_id.to_s, model.id.to_s)
  end
end