且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在单个事务中将图像上传到Firebase存储并将引用保存在数据库中?

更新时间:2023-02-15 12:30:04

这是除了使用事务之外的另一种方法.您可以使用Firebase Cloud Functions存储触发器.您可以编写一个云函数来获取上载图像的下载URL,然后将其推送到Firebase数据库.

This is another approach other than using transaction. You can use Firebase Cloud Functions Storage Trigger. You can write a cloud function to get the download URL of the uploaded image and then push it to firebase database.

通过firebase观看有关Cloud Function Storage Trigger的此视频