To delete a file, you first need to get a reference to the file, the same as we saw in upload and download. Once you get a reference, you can call a delete() method on it to delete a file. It returns a promise that either resolves in case of success or rejects in case of an error.
Consider this example:
// Create a reference to the file to delete
var fileRef = storageRef.child('folder/file.jpg');
// Delete the file
desertRef.delete().then(function() {
// File deleted successfully
}).catch(function(error) {
// an error occurred!
});
Now, let's see what is Google App Engine.