diff options
Diffstat (limited to 'app/uploaders/gitlab_uploader.rb')
-rw-r--r-- | app/uploaders/gitlab_uploader.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/uploaders/gitlab_uploader.rb b/app/uploaders/gitlab_uploader.rb index 7aa81a8c312..719bd6ef418 100644 --- a/app/uploaders/gitlab_uploader.rb +++ b/app/uploaders/gitlab_uploader.rb @@ -76,11 +76,12 @@ class GitlabUploader < CarrierWave::Uploader::Base end def open - stream = if file_storage? - File.open(path, "rb") if path - else - ::Gitlab::HttpIO.new(url, cached_size) if url - end + stream = + if file_storage? + File.open(path, "rb") if path + else + ::Gitlab::HttpIO.new(url, cached_size) if url + end return unless stream return stream unless block_given? |