gitlab-org--gitlab-foss/app/uploaders/legacy_artifact_uploader.rb
Sean McGivern a7dae52e9d Merge branch '4163-move-uploads-to-object-storage' into 'master'
Move uploads to object storage

Closes #4163

See merge request gitlab-org/gitlab-ee!3867
2018-02-28 20:58:15 +01:00

16 lines
332 B
Ruby

class LegacyArtifactUploader < GitlabUploader
extend Workhorse::UploadPath
include ObjectStorage::Concern
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