capabilities.work

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

Resolve a source file and copy it into a destination bucket.

  1. Log in to the B2 API to obtain the authorization token.
  2. List the file versions in the source bucket to resolve the fileId of the file to copy.
  3. 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.