Just a quick question regarding how to implement multiple Firebase Storage Security rules.
In fact I would like to limit the size of files that could be uploaded, but keeping my Auth Rules.
I have been reading this previous post which gave me a hint on how to limit the upload size per file, but I'm still struggling to implement "match /files/{fileName}" somewhere with the Auth Rules.
After multiple tries, this is my last iteration of it before writing this post:
service firebase.storage {
match /b/xxxxxxxx-xxx.appspot.com/o {
match /{allPaths=**}{
allow read: if request.auth != null;
allow write: if request.auth != null && request.resource.size < 1 * 1024 * 1024;
}
}
}
Of course, I did read the official Documentation, but it seems like I still can't get it right.