Uploads a part by copying data from an existing object as data source. You specify the data source by adding the request header x-amz-copy-source in your request and a byte range by adding the request header x-amz-copy-source-range in your request. Show The minimum allowable part size for a multipart upload is 5 MB. For more information about multipart upload limits, go to Quick Facts in the Amazon Simple Storage Service Developer Guide. Instead of using an existing object as part data, you might use the UploadPart operation and provide data in your request. You must initiate a multipart upload before you can upload any part. In response to your initiate request. Amazon S3 returns a unique identifier, the upload ID, that you must include in your upload part request. For more information about using the UploadPartCopy operation, see the following:
Note the following additional considerations about the request headers x-amz-copy-source-if-match, x-amz-copy-source-if-none-match, x-amz-copy-source-if-unmodified-since, and x-amz-copy-source-if-modified-since:
Versioning If your bucket has versioning enabled, you could have multiple versions of the same object. By default, x-amz-copy-source identifies the current version of the object to copy. If the current version is a delete marker and you don't specify a versionId in the x-amz-copy-source, Amazon S3 returns a 404 error, because the object does not exist. If you specify versionId in the x-amz-copy-source and the versionId is a delete marker, Amazon S3 returns an HTTP 400 error, because you are not allowed to specify a delete marker as a version for the x-amz-copy-source. You can optionally specify a specific version of the source object to copy by adding the versionId subresource as shown in the following example: x-amz-copy-source: /bucket/object?versionId=version id Special Errors
Related Resources
Arguments
Request syntaxsvc$upload_part_copy( Bucket = "string", CopySource = "string", CopySourceIfMatch = "string", CopySourceIfModifiedSince = as.POSIXct( "2015-01-01" ), CopySourceIfNoneMatch = "string", CopySourceIfUnmodifiedSince = as.POSIXct( "2015-01-01" ), CopySourceRange = "string", Key = "string", PartNumber = 123, UploadId = "string", SSECustomerAlgorithm = "string", SSECustomerKey = raw, SSECustomerKeyMD5 = "string", CopySourceSSECustomerAlgorithm = "string", CopySourceSSECustomerKey = raw, CopySourceSSECustomerKeyMD5 = "string", RequestPayer = "requester", ExpectedBucketOwner = "string", ExpectedSourceBucketOwner = "string" )Examplesif (FALSE) { # The following example uploads a part of a multipart upload by copying # data from an existing object as data source. svc$upload_part_copy( Bucket = "examplebucket", CopySource = "/bucketname/sourceobjectkey", Key = "examplelargeobject", PartNumber = "1", UploadId = "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP..." ) # The following example uploads a part of a multipart upload by copying a # specified byte range from an existing object as data source. svc$upload_part_copy( Bucket = "examplebucket", CopySource = "/bucketname/sourceobjectkey", CopySourceRange = "bytes=1-100000", Key = "examplelargeobject", PartNumber = "2", UploadId = "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP..." ) } |