Upload Part Copy

The Upload Part Copy operation uploads a part of a multipart upload by copying data from an existing object as the data source. In the request, specify the data source with request header x-amz-copy-source and specify the byte range with request header x-amz-copy-source-range.

Syntax Example

Request syntax example for Upload Part Copy:

PUT https://appliance:443/s3/v1/export/share_mount_point_path/bucket_name/object_name?partNumber=PartNumber&uploadId=UploadId

Versioning

If versioning is enabled for the bucket, multiple versions of the same object could exist. By default, x-amz-copy-source identifies the current version of an object to copy as part of a multipart upload. However, if the current version is a delete marker, Amazon S3 behaves as if the object were deleted.

To copy a different version, use the versionId subresource. For example: x-amz-copy-source: /source-bucket/source-object?versionId=version id.

Request Parameters

This implementation of the Upload Part Copy operation supports the following request parameters, as described in Upload Part Copy:

  • partNumber - required

  • uploadId - required

Request Headers

This implementation of the Upload Part Copy operation supports the following request headers, as described in Upload Part Copy:

  • x-amz-copy-source

  • x-amz-copy-source-if-match

  • x-amz-copy-source-if-modified-since

  • x-amz-copy-source-if-none-match

  • x-amz-copy-source-if-unmodified-since

  • x-amz-copy-source-range

  • x-amz-source-expected-bucket-owner

Request Elements

This implementation of the Upload Part Copy operation does not support the use of request elements.

Response Headers

This implementation of the Upload Part Copy operation supports the use of the following response header, as described in Upload Part Copy: x-amz-copy-source-version-id.

Response Elements

This implementation of the Upload Part Copy operation returns the following response elements, as described in Upload Part Copy:

  • CopyPartResult

  • ETag

  • LastModified

Expected HTTP Response Code

200 OK

Error Response Code

The Upload Part Copy operation does not return special errors. For general information about S3 errors and a list of error codes, see S3 Client Error Handling Reference.

Example

PUT /example-object?partNumber=2&uploadId=a8251fc8-6e82-4b2c-af7a-74ed97dd6c5d HTTP/1.1
x-amz-date: Thu, 12 Apr 2023 20:04:21 GMT
Authorization: authorization string
x-amz-copy-source: /source-bucket/sourceobject?versionId=9e4034c5-9d80-45b4-a98a-344f5ed6526c

HTTP/1.1 200 OK
x-amz-request-id: tx6313b3960a2a4b5ead0c7-006448847a
x-amz-copy-source-version-id: 9e4034c5-9d80-45b4-a98a-344f5ed6526c
Date: Thu, 12 Apr 2023 20:05:21 GMT
<CopyPartResult>
  <LastModified>2023-04-12T20:05:21.000Z</LastModified>
  <ETag>"cc9472149704128a4a7e3f90f828e394"</ETag>
</CopyPartResult>