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:
authorShinya Maeda <shinya@gitlab.com>2018-01-25 20:21:31 +0300
committerShinya Maeda <shinya@gitlab.com>2018-02-06 09:50:08 +0300
commit002f314f320c5731681297225fff5b528de88ed2 (patch)
treebc897fd5d1daff9e7a12815151b1a929266db074 /app/uploaders
parentb9692501060b3543bd3289bd806920044516db8c (diff)
Expose current_path
Diffstat (limited to 'app/uploaders')
-rw-r--r--app/uploaders/job_artifact_uploader.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/uploaders/job_artifact_uploader.rb b/app/uploaders/job_artifact_uploader.rb
index 841168438d8..4c814c6f501 100644
--- a/app/uploaders/job_artifact_uploader.rb
+++ b/app/uploaders/job_artifact_uploader.rb
@@ -14,9 +14,11 @@ class JobArtifactUploader < GitlabUploader
end
def open
- raise 'Only File System is supported' unless file_storage?
-
- File.open(path) if path
+ if file_storage?
+ File.open(path, "rb")
+ else
+ raise 'Only File System is supported'
+ end
end
private