[英]Create a new user and add new documents in Firebase database and add image in storage
I'm developing an app with flutter and I want to add information about the user account in the firebase database when I create it and add its profile image in the storage.我正在使用 flutter 开发一个应用程序,我想在创建它时在 firebase 数据库中添加有关用户帐户的信息,并将其个人资料图像添加到存储中。 And I want to be sure that either all of the operations succeed, or none of them are applied like transaction?
而且我想确保所有操作都成功,或者没有一个像事务一样应用? Can you please tell me how doing it?
你能告诉我怎么做吗?
There is no way to perform a transaction across multiple Firebase services, such as Authentication and the Realtime Database here.无法跨多个 Firebase 服务执行事务,例如此处的 Authentication 和 Realtime Database。
You'll have to assume that the data can get corrupted and define a strategy how to deal with that both in the code that consumes the user data, and possibly in (server-side) code that performs a periodic cleanup.您必须假设数据可能会损坏,并定义一个策略来处理该问题,既包括使用用户数据的代码,也可能包括执行定期清理的(服务器端)代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.