Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2017-10-03 13:34:24 +0300
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2017-10-03 13:34:24 +0300
commit8cbfe3aea64a11f8de0e28e35fc1fc298128158e (patch)
treea12867e59b7ae7584f3a67a406f832bd7cab7ee8 /app/controllers/projects/artifacts_controller.rb
parentca0e39048f0e92bd615c45bfe555800910396cfd (diff)
Redirect to pages daemon
Diffstat (limited to 'app/controllers/projects/artifacts_controller.rb')
-rw-r--r--app/controllers/projects/artifacts_controller.rb18
1 files changed, 11 insertions, 7 deletions
diff --git a/app/controllers/projects/artifacts_controller.rb b/app/controllers/projects/artifacts_controller.rb
index eb010923466..a8f56acc73b 100644
--- a/app/controllers/projects/artifacts_controller.rb
+++ b/app/controllers/projects/artifacts_controller.rb
@@ -29,13 +29,17 @@ class Projects::ArtifactsController < Projects::ApplicationController
blob = @entry.blob
conditionally_expand_blob(blob)
- respond_to do |format|
- format.html do
- render 'file'
- end
-
- format.json do
- render_blob_json(blob)
+ if blob.external_link?
+ redirect_to blob.external_url(@project, build)
+ else
+ respond_to do |format|
+ format.html do
+ render 'file'
+ end
+
+ format.json do
+ render_blob_json(blob)
+ end
end
end
end