如何获得所有图片的数组? [英] How to get an array with all pictures?
问题描述
目前在Firebase存储中没有API调用来列出文件夹中的所有文件。如果您需要这些功能,则应将文件的元数据(例如下载网址)存储在可列出的地方。 Firebase实时数据库非常适合您,也可以轻松与其他人共享这些网址。
你可以在我们的 FriendlyPix 示例应用程序。网络版的相关代码是这里,但也有iOS和Android的版本。
I'm working to upload images, everything works great, but I have 100 pictures and I would like to show them all in my view, as I get the complete list of the images in a folder, I can not find in the new api this option.
There currently is no API call in Firebase Storage to list all files in a folder. If you need such functionality, you should store the metadata of the files (such as the download URLs) in a place where you can list them. The Firebase Realtime Database is perfect for this and allows you to also easily share the URLs with others.
You can find a good (but somewhat involved) sample of this in our FriendlyPix sample app. The relevant code for the web version is here, but there are also versions for iOS and Android.
这篇关于如何获得所有图片的数组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!