rules_version = '2'; service firebase.storage { match /b/{bucket}/o { // Disallow all by default match /{allPaths=**} { allow read, write: if false } // Allow creation if size is not too big and resource does not exist match /api/{fileName} { allow read: if true; } } }