Commit afb49b04 authored by Nick Thomas's avatar Nick Thomas

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
parents 99fb3482 97cabfb6
---
title: Send back required object storage PUT headers in /uploads/authorize API
merge_request: 21319
author:
type: changed
...@@ -41,7 +41,9 @@ module ObjectStorage ...@@ -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 ...@@ -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
......
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