I was working on a project that uses firebase database and storage, I upload an image to firebase storage and retrieve its download url to be stored in the realtime database to update the UI (that very normal process i think ,no problem here), however I noticed that if I used this download url after the image was deleted from firebase storage it still work , could anyone explain why this happens , and for how long can the download url be working even after its related image was deleted from the storage , can I relay only on the download url to support the UI without the images be stored in firebase storage ? , thanks in advance
1 Answers
0
votes
Instead of storing the download url, you can store the reference path of the image you are using. The stored reference path of image can be used to fetch the download url.
This way, if the image is deleted from the storage and you try to fetch the download url for that image it will throw an error which you can explicitly handle using your code.
Hope it helps you.