How to set file size limit on upload to R2 bucket?

I’m using R2 with direct upload from the frontend via presigned url. I want to set a file size limit so files can’t be bigger than X size. How can I set that limit on items uploaded to the bucket?