Reader small image

You're reading from  Firebase Cookbook

Product typeBook
Published inNov 2017
PublisherPackt
ISBN-139781788296335
Edition1st Edition
Right arrow
Author (1)
Houssem Yahiaoui
Houssem Yahiaoui
author image
Houssem Yahiaoui

Houssem Yahiaoui is a Telerik Developer Expert, Google Developer Group Lead, Meetup organizer, Conference Speaker, and Technical blogger among a few things. He has been a developer since the age of 14 and Firebase lover since day one. He's also a passionate JavaScript developer and strongly believes that JavaScript should fix the World's hanger problem.
Read more about Houssem Yahiaoui

Right arrow

Implementing file deletion

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.

How to do it...

  1. 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>');
  1. Now let's use a special method or function...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Firebase Cookbook
Published in: Nov 2017Publisher: PacktISBN-13: 9781788296335

Author (1)

author image
Houssem Yahiaoui

Houssem Yahiaoui is a Telerik Developer Expert, Google Developer Group Lead, Meetup organizer, Conference Speaker, and Technical blogger among a few things. He has been a developer since the age of 14 and Firebase lover since day one. He's also a passionate JavaScript developer and strongly believes that JavaScript should fix the World's hanger problem.
Read more about Houssem Yahiaoui