summaryrefslogtreecommitdiff
path: root/lib/object_storage
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-09-13 15:58:04 -0700
committerStan Hu <stanhu@gmail.com>2018-09-14 07:43:39 -0700
commit244ed8adb3bc2d1b4706a695e19e144e180084f3 (patch)
treeb274dde215c9bcd40d4e9819acfb8f5d93249bac /lib/object_storage
parent32b96bfd81ff254142dbd9c73e1a494308213cb3 (diff)
downloadgitlab-ce-244ed8adb3bc2d1b4706a695e19e144e180084f3.tar.gz
Fix object storage uploads not working with AWS v2
Because we were passing query strings as symbols, the fog-aws storage driver was omitting the uploadId and partNumber query strings from the signature in multipart uploads. This fix makes AWS and Ceph work with v2 signatures. See: https://github.com/fog/fog-aws/blob/v3.0.0/lib/fog/aws/storage.rb#L733 Closes https://gitlab.com/gitlab-org/gitlab-workhorse/issues/181
Diffstat (limited to 'lib/object_storage')
-rw-r--r--lib/object_storage/direct_upload.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/object_storage/direct_upload.rb b/lib/object_storage/direct_upload.rb
index ab43910c8bd..97f56e10ccf 100644
--- a/lib/object_storage/direct_upload.rb
+++ b/lib/object_storage/direct_upload.rb
@@ -89,7 +89,7 @@ module ObjectStorage
method: 'PUT',
bucket_name: bucket_name,
object_name: object_name,
- query: { uploadId: upload_id, partNumber: part_number },
+ query: { 'uploadId' => upload_id, 'partNumber' => part_number },
headers: upload_options
}, expire_at)
end
@@ -100,7 +100,7 @@ module ObjectStorage
method: 'POST',
bucket_name: bucket_name,
object_name: object_name,
- query: { uploadId: upload_id },
+ query: { 'uploadId' => upload_id },
headers: { 'Content-Type' => 'application/xml' }
}, expire_at)
end
@@ -111,7 +111,7 @@ module ObjectStorage
method: 'DELETE',
bucket_name: bucket_name,
object_name: object_name,
- query: { uploadId: upload_id }
+ query: { 'uploadId' => upload_id }
}, expire_at)
end