从Firebase商店获取图像列表 [英] Get list of images from Firebase Store

查看:74
本文介绍了从Firebase商店获取图像列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获取图像列表,该图像是我在Web Firebase控制台中手动上传的.有什么方法可以不使用FirebaseRecyclerAdapter而获得所有文件的列表?

I want to get list of images which I uploaded manually in web Firebase console. Is there any way I can get list of all files without using FirebaseRecyclerAdapter?

推荐答案

没有现有的方法来提取您在Firestore中保存的文件名列表.相反,您必须使用一些解决方法来手动创建列表.例如,在Firebase数据库中维护文件和URL的列表.

There is no existing method to extract the list of file name you have saved in Firestore. Instead you have to use some workaround to manually create a list. For example, maintaining a list of file and URL inside Firebase database.

一种可能的解决方案是使用云功能编写触发器,侦听对Firebase Storage所做的更改.(由于这一次您直接通过控制台进行上传,因此您必须编写触发器并将其托管在云功能中) .在附件列表中进行插入/删除/修改后,更新firebase数据库中的虚拟文件条目.当您尝试提取文件/URL信息列表时,请从数据库而不是存储中检索它们.

One possible solution is to write a trigger using cloud functions, listening to the changes made to Firebase Storage.(as this time you are doing the upload directly through console, you have to write a trigger and host it in cloud function). Upon there is insertion/ removal/ modification in the attachment list, update the dummy file entries inside the firebase database. When you are trying to extract the list of file/ url information, retrieve them from database but not storage.

有关更多信息,请参阅以下文档: https://firebase.google.com/docs/functions/gcp-storage-events?hl = zh-cn

You may refer to below document for more information: https://firebase.google.com/docs/functions/gcp-storage-events?hl=zh-cn

如何在Firebase应用程序中获取Cloud Storage中所有文件的列表?

这篇关于从Firebase商店获取图像列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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