diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-18 11:11:44 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-18 11:11:44 +0000 |
commit | 25989ab7ef1a444ed2abd5479f176d58e1d9462a (patch) | |
tree | 271bb24f3c7178f320cb9de0be0833a285327d09 /app/uploaders | |
parent | 9bbb32b29703f3ce33dd35d5101145774b793a6d (diff) | |
download | gitlab-ce-25989ab7ef1a444ed2abd5479f176d58e1d9462a.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/uploaders')
-rw-r--r-- | app/uploaders/object_storage.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/uploaders/object_storage.rb b/app/uploaders/object_storage.rb index f99ad987156..36bde629f9c 100644 --- a/app/uploaders/object_storage.rb +++ b/app/uploaders/object_storage.rb @@ -180,10 +180,11 @@ module ObjectStorage end def workhorse_authorize(has_length:, maximum_size: nil) - { - RemoteObject: workhorse_remote_upload_options(has_length: has_length, maximum_size: maximum_size), - TempPath: workhorse_local_upload_path - }.compact + if self.object_store_enabled? && self.direct_upload_enabled? + { RemoteObject: workhorse_remote_upload_options(has_length: has_length, maximum_size: maximum_size) } + else + { TempPath: workhorse_local_upload_path } + end end def workhorse_local_upload_path |