After initiating a multipart upload, you can use this operation to upload parts for the multipart upload using its uploadId.
In a multipart upload for a specific object, parts of the object can be uploaded in any sequence and multiple parts can be uploaded concurrently.
Part sizes range from 5 MB to 5 GB. However, in a complete multipart operation, the size of the last uploaded part must range from 0 to 5 GB. In addition, the uploadId of each part must be in the range of 1 to 10000.
This operation makes server-side encryption available.
When the same multipart of the same object is uploaded concurrently, the server complies with the Last Write Win policy.
The time of Last Write is the creation time of the multipart metadata. To ensure data security, you must add a lock to the client to ensure the upload consistency of the same multipart. There is no need to add a lock when different parts of the same object are uploaded.
PUT /ObjectName?partNumber=partNum&uploadId=uploadID HTTP/1.1 User-Agent: agent Host: bucketname.obs.example.com Accept: */* Date: date Content-Length: Size Authorization: Signature Content-MD5: md5 Expect: expect
This request uses parameters to specify the ID of a multipart upload and part number. Table 1 describes the parameters.
This request uses common headers. For details about common request headers, see section Common Request Headers.
Header |
Description |
Remarks |
---|---|---|
x-amz-server-side-encryption-customer-algorithm |
Indicates an encryption algorithm. The header is used in SSE-C mode. Type: string Example: x-amz-server-side-encryption-customer-algorithm:AES256 Constraints: This header must be used together with x-amz-server-side-encryption-customer-key and x-amz-server-side-encryption-customer-key-MD5. |
No. This header is mandatory when customer-provided keys are used. |
x-amz-server-side-encryption-customer-key |
Indicates a key used to encrypt objects. The header is used in SSE-C mode. Type: string Example: x-amz-server-side-encryption-customer-key:K7QkYpBkM5+hcs27fsNkUnNVaobncnLht/rCB2o/9Cw= Constraints: This header is a base64-encoded 256-bit or 512-bit key and must be used together with x-amz-server-side-encryption-customer-algorithm and x-amz-server-side-encryption-customer-key-MD5. |
No. This header is mandatory when customer-provided keys are used. |
x-amz-server-side-encryption-customer-key-MD5 |
Indicates the MD5 value of a key used to encrypt objects. The header is used in SSE-C mode. The MD5 value is used to check whether any error occurs during the transmission of the key. Type: string Example: x-amz-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ== Constraints: This header is a base64-encoded 128-bit MD5 value and must be used together with x-amz-server-side-encryption-customer-algorithm and x-amz-server-side-encryption-customer-key. |
No. This header is mandatory when customer-provided keys are used. |
x-amz-security-token |
Header field used to identify the request of a federated user. When the federal authentication function is enabled, users sending such requests are identified as federated users. Type: string |
Optional. This parameter must be carried in the request sent by federated users. |
This request involves no elements.
HTTP/1.1 status_code x-amz-id-2: id x-amz-request-id: request id x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc Date: date ETag: etagValue Content-Length: length Server: server
This response uses common headers. For details about common response headers, see section Common Response Headers.
Header |
Description |
---|---|
x-amz-server-side-encryption |
This header is included in a response if SSE-KMS is used. Type: string Example: x-amz-server-side-encryption:aws:kms |
x-amz-server-side-encryption-aws-kms-key-id |
Indicates the master key ID. This header is included in a response if SSE-KMS is used. Example: x-amz-server-side-encryption-aws-kms-key-id:arn:aws:kms:sichuan:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0 |
x-amz-server-side-encryption-customer-algorithm |
Indicates an encryption algorithm. This header is included in a response if SSE-C is used. Type: string Example: x-amz-server-side-encryption-customer-algorithm:AES256 |
x-amz-server-side-encryption-customer-key-MD5 |
Indicates the MD5 value of a key used to encrypt objects. This header is included in a response if SSE-C is used. Type: string Example: x-amz-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ== |
This response involves no elements.
For details about other error responses, see Table 1.
PUT /ObjectName?partNumber=1&uploadId=VCVsb2FkIElEIGZvciBlbZZpbmcncyBteS1tb3ZpZS5tMnRzIHVwbG9hZR HTTP/1.1 User-Agent: Jakarta Commons-HttpClient/3.1 Host: bucketname.obs.example.com Accept: */* Date: Mon, 1 Nov 2010 20:34:56 GMT Content-Length: 1048596 Authorization:AWS 14RZT432N80TGDF2Y2G2:8se2hm3YLchJhuPMDrybeITcuo0= Content-MD5:q3q7DaS8pTI6thGbtdzSlg==
HTTP/1.1 200 OK x-amz-id-2: Vvag1LuByRx9e6j5Onimru9pO4ZVKnJ2Qz7/C1NPcfTWAtRPfTaOFg== x-amz-request-id: 656c76696e6727732072657175657374 x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc Date: Mon, 1 Nov 2010 20:34:56 GMT ETag: "b54357faf0632cce46e942fa68356b38" Content-Length: 1048596