Merge branch 'sh-send-put-headers-object-storage' into 'master'
Send required object storage PUT headers in /uploads/authorize API See merge request gitlab-org/gitlab-ce!21319
This commit is contained in:
commit
afb49b044b
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Send back required object storage PUT headers in /uploads/authorize API
|
||||
merge_request: 21319
|
||||
author:
|
||||
type: changed
|
|
@ -41,7 +41,9 @@ module ObjectStorage
|
|||
GetURL: get_url,
|
||||
StoreURL: store_url,
|
||||
DeleteURL: delete_url,
|
||||
MultipartUpload: multipart_upload_hash
|
||||
MultipartUpload: multipart_upload_hash,
|
||||
CustomPutHeaders: true,
|
||||
PutHeaders: upload_options
|
||||
}.compact
|
||||
end
|
||||
|
||||
|
|
|
@ -61,6 +61,8 @@ describe ObjectStorage::DirectUpload do
|
|||
expect(subject[:GetURL]).to start_with(storage_url)
|
||||
expect(subject[:StoreURL]).to start_with(storage_url)
|
||||
expect(subject[:DeleteURL]).to start_with(storage_url)
|
||||
expect(subject[:CustomPutHeaders]).to be_truthy
|
||||
expect(subject[:PutHeaders]).to eq({ 'Content-Type' => 'application/octet-stream' })
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue