summaryrefslogtreecommitdiff
path: root/app/uploaders
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-03 12:08:53 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-03 12:08:53 +0000
commitb922b2f47a06597d5cbd77bf9b7f4c5fb3dbd8ed (patch)
tree5f86b7f535d3a6881d1d653238d623defa70e26e /app/uploaders
parent1c75400c24137f603678d0ee3d497b0c9280e7f7 (diff)
downloadgitlab-ce-b922b2f47a06597d5cbd77bf9b7f4c5fb3dbd8ed.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/uploaders')
-rw-r--r--app/uploaders/object_storage.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/uploaders/object_storage.rb b/app/uploaders/object_storage.rb
index 5297112eef8..63b6197a04d 100644
--- a/app/uploaders/object_storage.rb
+++ b/app/uploaders/object_storage.rb
@@ -169,6 +169,10 @@ module ObjectStorage
object_store_options.connection.to_hash.deep_symbolize_keys
end
+ def consolidated_settings?
+ object_store_options.fetch('consolidated_settings', false)
+ end
+
def remote_store_path
object_store_options.remote_directory
end
@@ -196,7 +200,7 @@ module ObjectStorage
id = [CarrierWave.generate_cache_id, SecureRandom.hex].join('-')
upload_path = File.join(TMP_UPLOAD_PATH, id)
direct_upload = ObjectStorage::DirectUpload.new(self.object_store_credentials, remote_store_path, upload_path,
- has_length: has_length, maximum_size: maximum_size)
+ has_length: has_length, maximum_size: maximum_size, consolidated_settings: consolidated_settings?)
direct_upload.to_hash.merge(ID: id)
end