• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. API Reference (OBS)
  4. Operations on Objects
  5. Upload Part - Copy
  6. Requests

Requests

Syntax

PUT /ObjectName?partNumber=partNum&uploadId=UploadID HTTP/1.1 
 User-Agent: agent 
 Host: bucketname.obs.example.com 
 Accept: */*
 Date: date 
 x-amz-copy-source: sourceobject 
 x-amz-copy-source-range:bytes=start-end 
 Authorization: auth 
 Content-Length: length

Request Parameters

This request uses parameters to specify the ID of a multipart upload and part number. Table 1 describes the parameters.

Table 1 Request parameters

Parameter

Description

Remarks

partNumber

Indicates the number that identifies a part to be uploaded.

Type: Integer

Mandatory

uploadId

Indicates the ID of a multipart upload.

Type: String

Mandatory

Request Headers

This request uses headers listed in Table 2 in addition to common headers.

Table 2 Request headers

Header

Description

Remarks

x-amz-copy-source

Indicates the source object to be copied.

Type: String

Mandatory

x-amz-copy-source-range

Indicates the range of bytes (start-end) to be copied from the source object. start indicates the start byte of the part to be copied and end indicates the end byte.

Type: Integer

Optional

x-amz-server-side-encryption-customer-algorithm

Indicates an algorithm used to encrypt a destination part. 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 SSE-C is used. The encryption algorithm must be the same as the algorithm used to initiate multipart upload tasks.

x-amz-server-side-encryption-customer-key

Indicates a key used to encrypt a destination part. 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 SSE-C is used. The key must be the same as that used to initiate multipart upload tasks.

x-amz-server-side-encryption-customer-key-MD5

Indicates the MD5 value of a key used to encrypt a destination part. 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 SSE-C is used. The MD5 value must be the same as that used to initiate multipart upload tasks.

x-amz-copy-source-server-side-encryption-customer-algorithm

Indicates an algorithm used by a source object. The header is used in SSE-C mode.

Type: string

Example: x-amz-copy-source-server-side-encryption-customer-algorithm:AES256

Constraints: This header must be used together with x-amz-copy-source-server-side-encryption-customer-key and x-amz-copy-source-server-side-encryption-customer-key-MD5.

No. This header is mandatory when SSE-C is used to copy a source object.

x-amz-copy-source-server-side-encryption-customer-key

Indicates the customer-provided key used to decrypt the source object when customer-provided keys are used.

Type: string

Example: x-amz-copy-source-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-copy-source-server-side-encryption-customer-algorithm and x-amz-copy-source-server-side-encryption-customer-key-MD5.

No.

This header is mandatory when customer-provided keys are used to copy source objects.

x-amz-copy-source-server-side-encryption-customer-key-MD5

Indicates the MD5 value of the customer-provided key used to decrypt the source object when customer-provided keys are used.

Type: string

Example: x-amz-copy-source-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==

Constraints: This header is a 128-bit base64-encoded string and must be used together with x-amz-copy-source-server-side-encryption-customer-algorithm and x-amz-copy-source-server-side-encryption-customer-key.

No.

This header is mandatory when customer-provided keys are used to copy source objects.

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.

Request Elements

This request involves no elements.