June 2018
Beginner to intermediate
394 pages
9h 2m
English
In any persistence, whether it is offline or remote storage, CRUD is the essential principle to understand. CRUD stands for Create, Read, Update, and Delete content. Now that we have explored the storage process, let's explore how to delete a file from the Firebase storage bucket. By default, the deletion process expects a Firebase Authentication, but we can change this in the storage security rules.
To delete a file, fetch the reference of the file and then simply call the delete() method on the reference:
StorageReference storageRef = storage.getReference();StorageReference desertRef = storageRef.child("images/desert.jpg");desertRef.delete().addOnSuccessListener(new OnSuccessListener<Void>() { @Override public void onSuccess ...
Read now
Unlock full access