Replies: 1 comment 3 replies
-
So anyone else looking for a solution, like @MiguelSOliveira and the duplicate question posted after mine. Directories do not really exist and the "folder structure" is not really a classic true folder. If you delete all the files, then the folder no longer exists in the firebase admin console. So anyone can think about the following code which is a recursive function to delete all files from a "folder" (essentially a root filePath).
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
firebase_storage: ^8.0.3
I have a function that I thought would work, but does not.
The filePath is correct and points to a folder in my storage which contains a few sub folders and files.
E/StorageException(19263): StorageException has occurred.
E/StorageException(19263): Object does not exist at location.
E/StorageException(19263): Code: -13010 HttpResult: 404
E/StorageException(19263): { "error": { "code": 404, "message": "Not Found. Could not delete object", "status": "DELETE_OBJECT" }}
E/StorageException(19263): java.io.IOException: { "error": { "code": 404, "message": "Not Found. Could not delete object", "status": "DELETE_OBJECT" }}
Imagine I have the file structure
parent/child1/subfolder1
I would like to delete the child1 folder. Is this possible? I saw a listAll() function, surely I don't have to loop by hand with nested ListResult returns?
Beta Was this translation helpful? Give feedback.
All reactions