Up until now, we have managed to upload and download our files from the Storage bucket, but sometimes we really want to delete the files we uploaded previously. This is doable using the Firebase Storage bucket APIs we used in the previous two sections.
Implementing file deletion
How to do it...
- As we discussed in the previous chapters before we do anything we need to grab ourselves a reference for the wanted file, so let's do that! The code for creating a reference is given as follows:
//Getting the Root Folder Reference.
var rootRef = firebase.storage().ref();
var imageRef = rootRef.child('images/<image-name>.
<image-ext>');
- Now let's use a special method or function...