When using the database you can do snapshot.exists()
to check if certain data exists. According to the docs there isn't a similar method with storage.
https://firebase.google.com/docs/reference/js/firebase.storage.Reference
What is the proper way of checking if a certain file exists in Firebase Storage?
You can use getDownloadURL which returns a Promise, which can in turn be used to catch a "not found" error, or process the file if it exists. For example:
storageRef.child("file.png").getDownloadURL().then(onResolve, onReject);
function onResolve(foundURL) {
//stuff
}
function onReject(error) {
console.log(error.code);
}