Cloudflare R2 icon

Cloudflare R2

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.

Overview

The "Download Multiple" operation in the Batch Operations resource of this Cloudflare R2 node allows users to download multiple files from a specified R2 bucket in one go. This batch operation is designed to simplify workflows where multiple objects need to be retrieved simultaneously, such as backing up several files, processing multiple datasets, or migrating data.

However, based on the current implementation, the "Download Multiple" operation is not yet implemented and will return a message indicating this status. Despite this, the node supports other batch operations like deleting multiple objects at once.

Practical example:

  • A user wants to download 10 specific files from their R2 bucket for local processing or archival. They would list all object keys (file paths) line-by-line in the "Object Keys" property and trigger the "Download Multiple" batch operation. Once implemented, the node would fetch all these files in a single execution.

Properties

Name Meaning
Bucket Name The name of the Cloudflare R2 bucket to operate on.
Object Keys One object key per line (max 1000 objects). Each key represents a file path in the bucket to download.

Output

Since the "Download Multiple" batch operation is currently not implemented, the output will be a JSON array containing an object with:

  • success: false
  • message: A string stating that the batch operation is not yet implemented.

For example:

[
  {
    "success": false,
    "message": "Batch operation downloadMultiple not yet implemented"
  }
]

When fully implemented, the expected output would likely include the downloaded files' metadata and binary data for each requested object.

Dependencies

  • Requires an API authentication credential for Cloudflare R2 to access buckets and objects.
  • Uses internal utility functions for interacting with Cloudflare R2 services.
  • No additional external dependencies are indicated.

Troubleshooting

  • Operation Not Implemented Error:
    Users attempting to use "Download Multiple" will receive a message that the operation is not yet implemented. This is expected behavior until the feature is developed.

  • Invalid Bucket Name or Object Keys:
    If the bucket name or object keys are invalid or incorrectly formatted, errors may occur. Ensure bucket names conform to Cloudflare R2 naming rules and object keys are correctly specified, one per line.

  • Exceeding Object Key Limit:
    The node enforces a maximum of 1000 object keys per batch operation. Providing more than 1000 keys will throw an error.

  • API Authentication Issues:
    Make sure the API key or credentials used have sufficient permissions to read from the specified bucket.

Links and References


Note: The above summary is based solely on static analysis of the provided source code and property definitions. The actual runtime behavior may evolve as the node is further developed.

Discussion