Check if a folder exists of a certain name in Firebase storage

后端 未结 1 1532
粉色の甜心
粉色の甜心 2020-12-12 05:59

In the Firebase Storage, I have a folder named uploads/. Inside that folder, I have multiple folders named after the userIds of the registered user

相关标签:
1条回答
  • 2020-12-12 06:42

    Cloud Storage for Firebase doesn't have event listners like Realtime Database. You're trying to do something that isn't supported (which is why you're getting a compiler error). Please see the API documentation for StorageReference to find out what you can do with that object.

    On top of that, there is no way to check if a "folder" exists in Cloud Storage. Cloud Storage doesn't actually have any folders. It just has files with path components that look like folders.

    If you want to know if a file exists (not a "folder"), then you could use the getMetadata method on a StorageReference that refers to the file.

    0 讨论(0)
提交回复
热议问题