Skip to content

gitflarePublicPartly agent-ready50

cf-r2-drop

Drag-and-drop file sharing on Cloudflare R2: multipart uploads, expiring share links, previews, download counts, lifecycle expiry.

main
Serve the share page from the extensionless asset path0e4544f
JSON with comments39 lines1.9 KB
{  "$schema": "node_modules/wrangler/config-schema.json",  "name": "cf-r2-drop",  "main": "src/index.ts",  "compatibility_date": "2026-10-01",  "compatibility_flags": ["nodejs_compat"],  "observability": { "enabled": true },  "assets": { "directory": "./public", "binding": "ASSETS", "run_worker_first": ["/health", "/api/*", "/d/*", "/s/*"] },  "r2_buckets": [{ "binding": "FILES", "bucket_name": "cf-r2-drop-files" }],  "durable_objects": { "bindings": [{ "name": "LINKS", "class_name": "Links" }] },  "migrations": [{ "tag": "v1", "new_sqlite_classes": ["Links"] }],  "vars": { "ENVIRONMENT": "dev" },  "triggers": { "crons": ["0 3 * * *"] },  "env": {    "staging": {      "assets": { "directory": "./public", "binding": "ASSETS", "run_worker_first": ["/health", "/api/*", "/d/*", "/s/*"] },      "r2_buckets": [{ "binding": "FILES", "bucket_name": "cf-r2-drop-files-staging" }],      "durable_objects": { "bindings": [{ "name": "LINKS", "class_name": "Links" }] },      "migrations": [{ "tag": "v1", "new_sqlite_classes": ["Links"] }],      "vars": { "ENVIRONMENT": "staging" },      "triggers": { "crons": ["0 3 * * *"] }    },    "production": {      "assets": { "directory": "./public", "binding": "ASSETS", "run_worker_first": ["/health", "/api/*", "/d/*", "/s/*"] },      "r2_buckets": [{ "binding": "FILES", "bucket_name": "cf-r2-drop-files-production" }],      "durable_objects": { "bindings": [{ "name": "LINKS", "class_name": "Links" }] },      "migrations": [{ "tag": "v1", "new_sqlite_classes": ["Links"] }],      "vars": { "ENVIRONMENT": "production" },      "triggers": { "crons": ["0 3 * * *"] }    }  },  "previews": {    "r2_buckets": [{ "binding": "FILES", "bucket_name": "cf-r2-drop-files-preview" }],    "durable_objects": { "bindings": [{ "name": "LINKS", "class_name": "Links" }] },    "migrations": [{ "tag": "v1", "new_sqlite_classes": ["Links"] }],    "vars": { "ENVIRONMENT": "preview" }  }}