summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-10-03 10:33:33 +0900
committerShinya Maeda <shinya@gitlab.com>2018-10-03 10:33:33 +0900
commit41fe9edcf75a96db2f29c172828e6adf0ca5b0c9 (patch)
tree905817422a31aafb8b4cc7981abaddf613f466e0 /app/controllers
parente5e307dd75f74c5e98b039332c58170dc9c2735f (diff)
parent42822a7d45f063804fe04f44e15cf04549460ae7 (diff)
downloadgitlab-ce-41fe9edcf75a96db2f29c172828e6adf0ca5b0c9.tar.gz
Merge branch 'master-ce' into scheduled-manual-jobs
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/artifacts_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/projects/artifacts_controller.rb b/app/controllers/projects/artifacts_controller.rb
index bd110d646e5..d0f59aa8162 100644
--- a/app/controllers/projects/artifacts_controller.rb
+++ b/app/controllers/projects/artifacts_controller.rb
@@ -14,6 +14,8 @@ class Projects::ArtifactsController < Projects::ApplicationController
before_action :entry, only: [:file]
def download
+ return render_404 unless artifacts_file
+
send_upload(artifacts_file, attachment: artifacts_file.filename)
end
@@ -100,7 +102,7 @@ class Projects::ArtifactsController < Projects::ApplicationController
# rubocop: enable CodeReuse/ActiveRecord
def artifacts_file
- @artifacts_file ||= build.artifacts_file
+ @artifacts_file ||= build.artifacts_file_for_type(params[:file_type] || :archive)
end
def entry