Object upload part Stay organized with collections Save and categorize content based on your preferences.
Uploads a part of amultipart upload. Returns an ETag which must be usedwhencompleting the multipart upload.
To ensure that data is not corrupted, you should specify aContent-MD5 headeror ax-goog-hash header in the request so that Cloud Storage can checkthe uploaded data against the provided value.
Uploaded parts are not included in requests to list objects in the bucket, butuploaded parts arecharged for storage and early deletion as if they wereobjects.
SeeQuotas & limits for limits associated with multipart uploads, includinglimits on part size and number of parts. For tips on uploading toCloud Storage, seeBest Practices.
Query string parameters
| Parameter | Description | Required |
|---|---|---|
partNumber | Uniquely identifies the position of the part within the larger multipart upload.partNumber is an integer with a mimimum value of 1 and a maximum value of 10,000. | Yes |
uploadId | Indicates the multipart upload that this part is associated with. | Yes |
Seesigned URL query string parameters for information on the parametersyou include when creating and usingsigned URLs.
Request headers
In addition tocommon request headers, thefollowing can be used.
| Header | Description | Required |
|---|---|---|
x-goog-hash | 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 initiatethe multipart upload, you must use thesame headers and values in each partupload.
Request body elements
The request body contains the data for the part being uploaded.
Request syntax
The following syntax applies to PUT Object requests that use theuploadIdquery string parameter.
PUT /OBJECT_NAME?partNumber=PART_NUMBER&uploadId=UPLOAD_ID HTTP/1.1Host:BUCKET_NAME.storage.googleapis.comDate:DATEContent-Length:REQUEST_BODY_LENGTHContent-MD5:MD5_DIGESTAuthorization:AUTHENTICATION_STRINGx-goog-hash:MD5_DIGEST
Response headers
Included in the response headers arex-goog-hash headers that specifythe CRC32C and MD5 base64-encoded checksums of the uploaded part.
The response also includes anETag header that must be used in the finalrequest to complete the multipart upload.
Response body elements
The response does not include an XML document in the response body.
Example
The following sample uploads the first part of an object namedparis.jpg to abucket namedtravel-maps.
Request
PUT /paris.jpg?partNumber=1&uploadId=VXBsb2FkIElEIGZvciBlbHZpbmcncyBteS1tb3ZpZS5tMnRzIHVwbG9hZA HTTP/1.1Host: travel-maps.storage.googleapis.comDate: Wed, 31 Mar 2021 16:31:08 GMTContent-Length: 100000000Content-MD5: Ojk9c3dhfxgoKVVHYwFbHQ==Authorization: Bearer ya29.AHES6ZRVmB7fkLtd1XTmq6mo0S1wqZZi3-Lh_s-6Uw7p8vtgSwg***part data omitted***
Response
HTTP/1.1 200 OKDate: Wed, 31 Mar 2021 20:34:56 GMTETag: "39a59594290b0f9a30662a56d695b71d"Content-Length: 0Server: UploadServerx-goog-hash: crc32c=n03x6A==x-goog-hash: md5=Ojk9c3dhfxgoKVVHYwFbHQ==
Common error codes
If the supplied MD5 digest is malformed, you get a400 Bad Request statuscode and the body of the error response hasInvalidDigest in theCodeelement.
If the digest does not match the digest we compute from the body, you get a400 Bad Request status code and the body of the error response hasBadDigest in theCode element.
If one of the parts specified in the request is more than 5 GiB, you get a400 Bad Request status code and the body of the error response hasEntityTooLarge in theCode element.
If theuploadId specified in the request is invalid or applies to a multipartupload that has already been completed or aborted, you get a404 Not Foundstatus code and the body of the error response hasNoSuchUpload in theCodeelement.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-17 UTC.