Workers body size limit, forwarding stream to origin?
Hi there!
Since workers have a limit on body size (https://developers.cloudflare.com/workers/platform/limits/#request-limits), if I want to handle uploads larger than that then if I understand correctly I would need some other server to process them. Is there a way to forward an incoming stream to an origin server without getting limited by the body size?
2 Replies
Not really. That limit isn't just for Workers, anything going through Cloudflare's proxy is subject to those same limits. You normally want to chunk your uploads to get around this. Also, R2 uploads don't have the same limit, so maybe you could store the file in R2 using the S3-compatible API (presigned url may work well) and have the Worker access it from there?
Ah I see. I like the presigned URL idea, I'll look into that. Thanks @Erisa !