Copy a File Into Another Bucket
A 3-step recipe with Backblaze. We can help you get access.
Recipe · 3 steps
Copy a File Into Another Bucket
with Backblaze
Resolve a source file and copy it into a destination bucket.
- Log in to the B2 API to obtain the authorization token.
- List the file versions in the source bucket to resolve the fileId of the file to copy.
- Create a new file in the destination bucket by server-side copying the resolved source file.
What you'll need to have ready
- sourceBucketId: The bucket to read the source file from.
- destinationBucketId: The bucket to copy the file into.
- newFileName: The name for the copied file in the destination bucket.
- prefix: Optional prefix to narrow the source file listing.
For your developer
Arazzo workflow backblaze:copy-file-into-bucket, 3 operations: authorizeAccount → listFileVersions → copyFile. Specs on APIs.io.