ashay ashay - 14 days ago 6
Android Question

Making firebase storage public for reading and writing on android

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

The documentation explains that if no rule expression is provided, the rule evaluates to true:

service firebase.storage {
  match /b/image-view-b1cf5.appspot.com/o {
    match /{allPaths=**} {
      // Allow access by all users
      allow read, write;
    }
  }
}