【问题标题】:Is there a way to send a notification to the app (using FCM or token) when an image file is added to Firebase Storage?将图像文件添加到 Firebase 存储时,是否可以向应用发送通知(使用 FCM 或令牌)?
【发布时间】:2021-09-04 08:51:55
【问题描述】:

用户正在将图像从网络上传到 Fire Storage。我想在上传图像时向客户端应用程序发送通知。有什么办法吗?

【问题讨论】:

    标签: firebase google-cloud-firestore notifications firebase-cloud-messaging


    【解决方案1】:

    当图像文件添加到 Firebase 存储时,是否可以向应用发送通知(使用 FCM 或令牌)?

    是的,你可以trigger a function on Cloud Storage changes:

    使用 functions.storage 创建一个处理 Cloud Storage 事件的函数。

    或者,您可以将URL of the image you have uploaded to Firebase Storage 存储到Cloud Firestore 中,然后再次触发文档更新功能,如以下答案所述:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-01-02
      • 2020-01-04
      • 1970-01-01
      • 2021-01-07
      • 2018-11-27
      • 2019-10-26
      • 1970-01-01
      相关资源
      最近更新 更多