Cloudflare R2 Storage icon

Cloudflare R2 Storage

Interact with Cloudflare R2 object storage. Upload, download, manage files and buckets. Supports batch operations, multipart uploads, and can be used as a tool by AI Agents.

Batch Operations → Upload Multiple

AI-generated

Summary

Upload multiple files to an R2 bucket

Inputs

  • bucketName (required) — The name of the R2 bucket to operate on.

Output shape

an array of result objects

Each element reports success or failure of the batch upload, including any error details.

Examples

Example 1: Upload a set of images to a bucket

resource=batch, operation=uploadMultiple, bucketName=my-photos, dataSource=binaryData, file list provided via input

Example 2: Delete temporary files in bulk

resource=batch, operation=deleteMultiple, bucketName=temp-files, objectKeys=tmp1.txt\n tmp2.log\n cache.zip

Example 3: Download many reports at once

resource=batch, operation=downloadMultiple, bucketName=reports, objectKeys=report-2024.pdf\n summary.docx\n data.csv

Discussion