-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstorage.rules
More file actions
30 lines (25 loc) · 883 Bytes
/
storage.rules
File metadata and controls
30 lines (25 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
// 1) Public reads everywhere
match /{allPaths=**} {
allow read;
}
// 2) Battle uploads — your beatbattle.js / submit.js writes here
match /battles/{battleId}/tracks/{fileName} {
allow write; // anyone can upload into this folder
}
// 3) Feedback uploads — your submit.js writes here
match /queues/feedback/{fileName} {
allow write; // anyone can upload feedback tracks
}
// 4) If you’re using a "submissions" path in submit.js (e.g. for both queues)
match /submissions/{queueType}/{fileName} {
allow write; // anyone can upload here, too
}
// 5) (Optional) Blog media uploads
match /blogMedia/{fileName} {
allow write: if request.auth != null; // only logged-in admins can upload blog media
}
}
}