-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathstorage.rules
22 lines (22 loc) · 1.15 KB
/
storage.rules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
service firebase.storage {
match /b/{bucket}/o {
match /private-video/{userId}/{contentId=**} {
// TODO prevent people from overwriting their files? Seems "allow create" still allows overwrite.
allow create: if request.resource.size < 61 * 1024 * 1024 // 61 MB (slightly more relaxed than client-side 60 MB)
&& request.auth.uid == userId;
allow read: if request.auth.uid == userId;
}
match /private-video/{videoToken}/{contentId=**} {
// TODO prevent people from overwriting their files? Seems "allow create" still allows overwrite.
allow create: if request.resource.size < 61 * 1024 * 1024 // 61 MB (slightly more relaxed than client-side 60 MB)
&& request.auth != null;
allow get: if request.auth != null;
}
match /invite-video/{videoToken}/{contentId=**} {
// TODO prevent people from overwriting their files? Seems "allow create" still allows overwrite.
allow create: if request.resource.size < 61 * 1024 * 1024 // 61 MB (slightly more relaxed than client-side 60 MB)
&& request.auth != null;
allow get: if request.auth != null;
}
}
}