Need help for upload script in my Cloudflare Pages site

Hello! I am creating a uploading route in my Cloudflare Pages app and while performing the tasks bellow one problem appeared:

1 - I receive the file as a AsyncIterable
2 - I convert this to a ReadableStream using ReadableStream.from
3 - When doing the upload to a pre-signed url to Cloudflare R2 I need to provide a Content-Length header
4 - To calculate the length of the stream I need to first read it fully before upload, using ReadableStream.tee I can do it but since only one branch was consumed first, the other branch will be enqueued in memory. This is a memory usage that could be prevented.
5 - To prevent this without the use of MultiPart upload (that I consider to much complexity for my use case), I had the ideia to store the stream in a temporary file and then read this file and upload, this way I would be using disk storage and not memory.

The step 5 makes sense in the context of Pages? If so, how much disk storage I am allowed to use for this temporary file?