Making firebase storage public for reading and writing on android

ashay picture ashay · Jul 29, 2016 · Viewed 32.3k times · Source

I am new to firebase storage. Can anyone tell me how to make the storage files public for reading and writing?. The default code provided by firebase is given below. What changes should I make ?

service firebase.storage {
  match /b/image-view-b1cf5.appspot.com/o {
    match /{allPaths=**} {
      allow read, write: if request.auth != null;
    }
  }
}

Answer

Ego Slayer picture Ego Slayer · Nov 25, 2016

FYI: if you want public read only.

service firebase.storage {
  match /b/image-view-b1cf5.appspot.com/o {
    match /{allPaths=**} {
        allow read;
        allow write: if request.auth != null;
    }
  }
}