Wrangler app that generates a log upon uploading a file to an R2 bucket.
- cdktf-cloudflare-upload-events-logger - Built with CDKTF instead of Wrangler.
- Cloudflare:
- Must have set the
CLOUDFLARE_API_TOKENvariable in your local environment.
- Must have set the
- pnpm:
- Must be installed in your system.
- Wrangler:
- Must be installed in your system.
Create R2 buckets:
npx wrangler r2 bucket create upload-bucket
npx wrangler r2 bucket create log-bucketCreate queue:
npx wrangler queues create event-notification-queueCreate worker:
npx wrangler deployEnable R2 event notifications:
npx wrangler r2 bucket notification create upload-bucket --event-type object-create --queue event-notification-queue-
Upload a file to
upload-bucketfrom the Cloudflare dashboard. -
After the upload is complete, logs will appear in
log-bucket.
npx wrangler delete