R2 Asset Manager
ACTIONCloudflare R2-backed asset storage service. Handles uploads, URL imports, and file serving with globally accessible shareable URLs.
Endpoints
· 6POST/uploadUpload a file via multipart/form-data to Cloudflare R2
Input Schema
{
"type": "object",
"required": [
"file"
],
"properties": {
"file": {
"type": "string",
"format": "binary",
"description": "File to upload (multipart/form-data)"
}
}
}GET/assetsList all assets with optional pagination and mimeType filter
Input Schema
{
"type": "object",
"properties": {
"page": {
"type": "integer",
"description": "Page number (default: 1)"
},
"limit": {
"type": "integer",
"description": "Items per page (default: 20, max: 100)"
},
"mimeType": {
"type": "string",
"description": "Filter by MIME type pattern (e.g. image/*)"
}
}
}DELETE/assets/:idDelete an asset from Cloudflare R2
Input Schema
{
"type": "object",
"properties": {}
}POST/import-urlImport a file from a remote URL into Cloudflare R2
Input Schema
{
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"description": "Remote URL to download from"
},
"filename": {
"type": "string",
"description": "Optional custom filename"
}
}
}GET/assets/:idGet metadata for a single asset by ID
Input Schema
{
"type": "object",
"properties": {}
}GET/assets/:id/downloadRedirect to the R2 public URL for direct download of an asset
Input Schema
{
"type": "object",
"properties": {}
}Required Secrets
· 5R2_ACCOUNT_IDR2_ACCESS_KEY_IDR2_SECRET_ACCESS_KEYR2_BUCKET_NAMER2_PUBLIC_URL
✦