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
3 changed files with 10 additions and 1 deletions
|
@ -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,
|
GetURL: get_url,
|
||||||
StoreURL: store_url,
|
StoreURL: store_url,
|
||||||
DeleteURL: delete_url,
|
DeleteURL: delete_url,
|
||||||
MultipartUpload: multipart_upload_hash
|
MultipartUpload: multipart_upload_hash,
|
||||||
|
CustomPutHeaders: true,
|
||||||
|
PutHeaders: upload_options
|
||||||
}.compact
|
}.compact
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,8 @@ describe ObjectStorage::DirectUpload do
|
||||||
expect(subject[:GetURL]).to start_with(storage_url)
|
expect(subject[:GetURL]).to start_with(storage_url)
|
||||||
expect(subject[:StoreURL]).to start_with(storage_url)
|
expect(subject[:StoreURL]).to start_with(storage_url)
|
||||||
expect(subject[:DeleteURL]).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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue