Analyze file uploads using Cloudflare's Malicious Upload Detection.
Pass-through Detection: Cloudflare scans the stream and injects the Malicious-Uploads-Detection header. This allows Workers to perform custom logic before saving to R2.
Direct Enforcement: Beyond header injection, you can also create WAF Custom Rules to block malicious requests at the edge automatically based on the scan result.