I have a folder in firebase storage where I upload users images to, however I can't delete this folder.
Storage.storage().reference().child("folder").delete();
I get error code 404, message: Not found. Could not delete object.
I have a folder in firebase storage where I upload users images to, however I can't delete this folder.
Storage.storage().reference().child("folder").delete();
I get error code 404, message: Not found. Could not delete object.
EDIT:
You can use the new List API to list files in storage with some common prefix. The prefix is effectively the the path where the objects live. You will have to them iterate each object you get from the API, and delete each one individually. Also read this blog post about the API.
ORIGINAL ANSWER:
There is currently no way to programmatically delete an entire folder in Cloud Storage with the Firebase SDK. It turns out, with Cloud Storage, there is not even any "folders" at all. A storage bucket just a collection of objects that have names that look like file paths. It is not a real "filesystem" in this respect.
If you want to delete all the files under a certain path, you will have to find all their names and remove them individually. Typically, applications will store the paths of known objects in Realtime Database for this reason.
If you want to delete all objects under a path from the command line with gsutil, read the docs for "gsutil rm".