Initiates a XML API multipart upload with a
POST request. This initial
request generates an upload ID for use in subsequent
PUT requests to
upload the data in parts and in the final
POST request to
complete the upload. There is no limit to the number of multipart
uploads that can be underway for a given object.
This initial request allows you to specify metadata for the completed object. Once a multipart upload completes, the uploaded object replaces any existing object with the same name. For tips on uploading to Cloud Storage, see best practices.
For simple uploads with the XML API, you make a
PUT Object request
instead of using
Query string parameters
||Indicates the request is to initiate a multipart upload.||Yes|
The following request headers can be used.
||The authentication string for the request.||Yes|
||The conditions under which the resulting object should be cached if it
is publicly accessible.
||A header that specifies presentational information about how the resulting object data is to be transmitted.||No|
||The compression algorithm that was used to compress the data you are uploading.||No|
||The ISO 639-1 language code of the content.||No|
The length of the request body without headers (in bytes). For initiating a multipart upload, this value is 0.
||The MIME type of the data you are uploading. If you do not specify a
content type, Cloud Storage defaults to
||The date and time of the request.||Yes|
||The URI for Cloud Storage. For more information, see Request Endpoints.||Yes|
||The predefined ACL that you want to apply to the object.||No|
||A user-specified date and time.||No|
||The customer-managed encryption key to use to encrypt the object.||No|
||An extension header that can be used to store custom metadata.||No|
||Gives each part of the upload and the resulting object a storage class besides the default storage class of the associated bucket.||No|
||The project to be billed for charges associated with this request.||No|
To provide a customer-supplied encryption key along with the object upload, use the headers listed on the Customer-Supplied Encryption Key page in your request.
Request body elements
This request does not include an XML document in the request body.
The request can return a variety of response headers depending on the request headers you use.
Response body elements
The following response body elements apply to POST Object requests that use the
uploads query string parameter.
||Container for the response to the upload initiation request.|
||The name of the bucket the multipart upload was initiated in.|
||The name of the object the multipart upload was initiated for.|
||The upload ID of the initiated multipart upload.|
The following sample initiates a multipart upload for an object named
paris.jpg in a bucket named
POST /paris.jpg?uploads HTTP/2 Host: travel-maps.storage.googleapis.com Date: Wed, 24 Mar 2021 18:11:50 GMT Content-Type: image/jpg Content-Length: 0 Authorization: Bearer ya29.AHES6ZRVmB7fkLtd1XTmq6mo0S1wqZZi3-Lh_s-6Uw7p8vtgSwg
HTTP/2 200 Date: Wed, 24 Mar 2021 18:11:53 GMT Content-Length: 280 Content-Type: application/xml Server: UploadServer <?xml version="1.0" encoding="UTF-8"?> <InitiateMultipartUploadResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <Bucket>travel-maps</Bucket> <Key>paris.jpg</Key> <UploadId>VXBsb2FkIElEIGZvciBlbHZpbmcncyBteS1tb3ZpZS5tMnRzIHVwbG9hZA</UploadId> </InitiateMultipartUploadResult>