如何获得所有图片的数组? [英] How to get an array with all pictures?

查看:199
本文介绍了如何获得所有图片的数组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在上传图片,一切都很好,但是我有100张图片,我想把它们都显示在我的视图中,因为我得到了一个文件夹中的图像的完整列表,我无法找到新的api这个选项。

解决方案

目前在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆