To ensure that data is not corrupted, you should specify a
x-goog-hash header in the request so that Cloud Storage can check
the uploaded data against the provided value.
Uploaded parts are not included in requests to list objects in the bucket, but uploaded parts are charged for storage and early deletion as if they were objects.
Query string parameters
||Uniquely identifies the position of the part within the larger multipart
||Indicates the multipart upload that this part is associated with.||Yes|
In addition to common request headers, the following can be used.
||An MD5 and/or CRC32C base64-encoded checksum of the part data.||No|
If you specified a customer-supplied encryption key in the request to initiate the multipart upload, you must use the same headers and values in each part upload.
Request body elements
The request body contains the data for the part being uploaded.
The following syntax applies to PUT Object requests that use the
query string parameter.
PUT /OBJECT_NAME?partNumber=PART_NUMBER&uploadId=UPLOAD_ID HTTP/1.1 Host: BUCKET_NAME.storage.googleapis.com Date: DATE Content-Length: REQUEST_BODY_LENGTH Content-MD5: MD5_DIGEST Authorization: AUTHENTICATION_STRING x-goog-hash: MD5_DIGEST
Included in the response headers are
x-goog-hash headers that specify
the CRC32C and MD5 base64-encoded checksums of the uploaded part.
The response also includes an
ETag header that must be used in the final
request to complete the multipart upload.
Response body elements
The response does not include an XML document in the response body.
The following sample uploads the first part of an object named
paris.jpg to a
PUT /paris.jpg?partNumber=1&uploadId=VXBsb2FkIElEIGZvciBlbHZpbmcncyBteS1tb3ZpZS5tMnRzIHVwbG9hZA HTTP/1.1 Host: travel-maps.storage.googleapis.com Date: Wed, 31 Mar 2021 16:31:08 GMT Content-Length: 100000000 Content-MD5: Ojk9c3dhfxgoKVVHYwFbHQ== Authorization: Bearer ya29.AHES6ZRVmB7fkLtd1XTmq6mo0S1wqZZi3-Lh_s-6Uw7p8vtgSwg ***part data omitted***
HTTP/1.1 200 OK Date: Wed, 31 Mar 2021 20:34:56 GMT ETag: "39a59594290b0f9a30662a56d695b71d" Content-Length: 0 Server: UploadServer x-goog-hash: crc32c=n03x6A== x-goog-hash: md5=Ojk9c3dhfxgoKVVHYwFbHQ==
Common error codes
If the supplied MD5 digest is malformed, you get a 400 Bad Request status
code and the body of the error response has
InvalidDigest in the
If the digest does not match the digest we compute from the body, you get a
400 Bad Request status code and the body of the error response has
BadDigest in the
uploadId specified in the request is invalid or applies to a multipart
upload that has already been completed or aborted, you get a 404 Not Found
status code and the body of the error response has
NoSuchUpload in the