Worker upload large file

We are using worker to large file to s3/r2
Due to the worker limit Limits · Cloudflare Workers docs

Currently the worker will crash and throw an exception when we posted a form with large file…

I wonder if we could use code to check the post body is greater than 100MB and returns an error?

You can check the Content-Length header of the incoming request.