14 lines
382 B
Plaintext
14 lines
382 B
Plaintext
rules_version = '2';
|
|
|
|
service firebase.storage {
|
|
match /b/{bucket}/o {
|
|
match /{userId}/{vocabId} {
|
|
allow read: if request.auth != null;
|
|
allow create, update: if request.auth.uid == userId &&
|
|
request.resource.contentType.matches("audio/mp3") &&
|
|
request.resource.size < 1024 * 1024 / 5 &&
|
|
vocabId.matches('[a-zA-Z0-9_-]+\\.mp3');
|
|
}
|
|
}
|
|
}
|