Is there a method/ruleset for Firebase 3 storage to disable file updating or overwriting?
I found data.exists() for Database but no solution for Storage.
TL;DR: In Storage Security Rules, request.resource ~= newData.val() and resource ~= data.val(), so you can use them similarly.
service firebase.storage {
  match /b/<bucket>/o {
    match /path/to/file {
      allow write: if resource == null; // if !data.exists() in DB land
    }
  }
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With