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:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-18 14:11:44 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-18 14:11:44 +0300
commit25989ab7ef1a444ed2abd5479f176d58e1d9462a (patch)
tree271bb24f3c7178f320cb9de0be0833a285327d09 /app/uploaders
parent9bbb32b29703f3ce33dd35d5101145774b793a6d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/uploaders')
-rw-r--r--app/uploaders/object_storage.rb9
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