How can I add a rule to limit the maximum storage space size a user can consume? The current request.resource.size limits the size of a file a user can upload but not the folder/bucket size the user is uploading to. I wish to place a limit say 50 MB over all the content the user can upload.
Update:
To reframe the question, imagine the user has already uploaded 5 images of size 10MB each which makes it 50 MB altogether. Now I want to restrict the user from uploading any more files as the maximum bucket size (in my case: 50MB) is already reached. There could have been 2 files of 20 MB each and one of 10 MB, but the overall cap of 50 MB has to be respected. How do I add a rule for that?
Update 2:
Is it that in the current implementation, an authenticated user can keep on uploading an infinite amount of data say capped at 10 MB file size each at the expense of the user hosting the Firebase service (Assuming a pay as you go pricing model while hosting)?