Commit f3cd8027 authored by Stan Hu's avatar Stan Hu

Omit the multipart hash if Workhorse S3 client is used

The Workhorse S3 client handles multipart uploads in a much more robust
way. We don't need to generate pre-signed URLs when it is used.
parent de2e069c
...@@ -206,7 +206,7 @@ module ObjectStorage ...@@ -206,7 +206,7 @@ module ObjectStorage
end end
def requires_multipart_upload? def requires_multipart_upload?
config.aws? && !has_length && can_use_multipart_upload? config.aws? && !has_length && can_use_multipart_upload? && !use_workhorse_s3_client?
end end
def can_use_multipart_upload? def can_use_multipart_upload?
......
...@@ -162,6 +162,10 @@ RSpec.describe ObjectStorage::DirectUpload do ...@@ -162,6 +162,10 @@ RSpec.describe ObjectStorage::DirectUpload do
it 'enables the Workhorse client' do it 'enables the Workhorse client' do
expect(subject[:UseWorkhorseClient]).to be true expect(subject[:UseWorkhorseClient]).to be true
end end
it 'omits the multipart upload URLs' do
expect(subject).not_to include(:MultipartUpload)
end
end end
context 'when only server side encryption is used' do context 'when only server side encryption is used' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment