You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: storage/README.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ To modify the Rules follow these steps:
32
32
33
33
## Default Rules
34
34
35
-
```language
35
+
```
36
36
service firebase.storage {
37
37
match /b/<YOUR-PROJECT-ID>.appspot.com/o {
38
38
match /{allPaths=**} {
@@ -48,7 +48,7 @@ These rules are very similar to the `Auth` default rules. They mean that any aut
48
48
49
49
The following rules allows any user to upload, delete and mofify files from your entire bucket. Use this only while developing and testing.
50
50
51
-
```language
51
+
```
52
52
service firebase.storage {
53
53
match /b/<YOUR-PROJECT-ID>.appspot.com/o {
54
54
match /{allPaths=**} {
@@ -62,7 +62,7 @@ service firebase.storage {
62
62
63
63
Use the following rules if you need to host some files that anyone on the Internet can download, such as images, documents, audio and video.
64
64
65
-
```language
65
+
```
66
66
service firebase.storage {
67
67
match /b/<YOUR-PROJECT-ID>.appspot.com/o {
68
68
match /{allPaths=**} {
@@ -74,7 +74,7 @@ service firebase.storage {
74
74
75
75
These rules will allow anyone to read the contents of a folder named `public`.
76
76
77
-
```language
77
+
```
78
78
service firebase.storage {
79
79
match /b/<YOUR-PROJECT-ID>.appspot.com/o {
80
80
match /public/} {
@@ -314,14 +314,14 @@ A successful response will look like the following JSON structure:
314
314
}
315
315
```
316
316
317
-
### User specific files
317
+
### User Specific Files
318
318
319
319
So far we have worked with the same file (`savegame.data`) in the same location (`savegames` folder),
320
320
now we are going to step it up and make it so every registered user can have their own folder with their respective `savegame.data` file.
321
321
322
322
The following rules specify that only authenticated users can read and write the file `savegame.data` that will be located inside a folder named the same as their `uid` (`localId`):
323
323
324
-
```json
324
+
```
325
325
service firebase.storage {
326
326
match /b/<YOUR-PROJECT-ID>.appspot.com/o {
327
327
match /savegames/{userId}/savegame.data {
@@ -333,7 +333,7 @@ service firebase.storage {
333
333
334
334
We can use the following rules if we want users to have control over their complete folder:
0 commit comments