firebase / firebase-android-sdk

Firebase Android SDK
https://firebase.google.com
Apache License 2.0
2.25k stars 573 forks source link

[firebase_storage] Check if a file exists without throwing exceptions #5414

Open kaminoan-dev opened 11 months ago

kaminoan-dev commented 11 months ago

What feature would you like to see?

Currently there is no function or method to cleanly check if a file exits in Firebase Storage.

This feature request is derived from Flutterfire issue 11620.

There are many ways that have been proposed to check if a file exists, which all consist on try-catch. This however results in the SDK throwing exception logs into the console.

How would you use it?

Have an exists async function in the Reference object which will return true or false depending on whether the file exists in Firebase Storage.

google-oss-bot commented 11 months ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.