s3_upload_part_copy
Copies a byte range from an existing B2 object into a part of an in-progress multipart upload, avoiding download and re-upload. Assembles large objects from data already in B2.
Instructions
Copy a byte range from an existing B2 object into a part of an in-progress S3-compatible multipart upload, without downloading or re-uploading the data. Requires the writeFiles capability on the destination and read access to the source object. The source must be a bucket reachable within the same B2 account and region as the destination; cross-account sources cannot be copied this way. Use this to assemble large objects from data already in B2; use s3_get_presigned_upload_part_url instead when the client must upload new bytes. The copied part belongs to the upload created by s3_create_multipart_upload, so it obeys the 1–10000 part numbering, the ≥5 MiB minimum for every part except the last, and the 5 GiB per-part maximum. A missing or inaccessible source, or a range outside the source object, fails the part copy. Returns the part ETag to pass to s3_complete_multipart_upload.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | The destination object key. | |
| bucket | Yes | The destination bucket name. | |
| uploadId | Yes | The UploadId from s3_create_multipart_upload. | |
| copySource | Yes | The source object in 'bucket/key' format, e.g. 'my-bucket/path/to/file.dat'. URL-encode special characters in the key. | |
| partNumber | Yes | The part number (1-10000). | |
| copySourceRange | No | Byte range to copy from the source, e.g. 'bytes=0-104857599' for the first 100 MiB; omit to copy the entire source object. The copied range must be ≥5 MiB unless this is the last part, and at most 5 GiB. | |
| copySourceVersionId | No | Version ID of the source object to copy; set to copy that exact version, or omit to copy the current version. |