You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何从Firestore文档对象中获取指定的图片链接值?

Firestore文档中获取图片链接问题

在开发应用后端功能时,我将图片引用链接存储在Firestore的文档中,需要仅获取该链接以访问图片。若无法直接实现,也希望得到其他解决思路。

以下是我编写的代码:

async function ListImageData()
{
  const querySnapshot = await getDocs(collection(db, "users", "userUID2", "images"));
  querySnapshot.forEach((doc) => {
    console.log(doc.id, " => ", doc.get['image:']);
      });
}

当前执行代码后的输出数据如图:
输出数据截图

内容的提问来源于stack exchange,提问作者HelloToxicity

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.09 10:51:09