Add support for deleting directories and their contents in Firebase Storage
Iterating over list of files and deleting each is wasteful as a call has to be made using the API for each file, and this can get expensive if a lot of delete operations are involved.
I suggest a single API call that deletes all data given the required parameters. Further, the response from Firebase API will be that it has received the instruction to delete, and not when it has completed deleting as the operation might take quite a while.
A function could look like this.
deleteFolder({
url: 'path',
responsetype: 'requestreceived', // Another could be 'deletecomplete'
recursivedelete: true, // Default is false. A bit similar to rm -rf
})
3
votes
Mohammad Anas Mudassir
shared this idea