简体   繁体   English

创建新用户并在 Firebase 数据库中添加新文档并在存储中添加图像

[英]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.

相关问题 每次用户在 firebase 存储中拍摄新照片时创建一个新图像 - Create a new image every time user takes a new photo in firebase storage 当用户在 react js 中使用用户的 uid 创建帐户时,在 firebase 中添加一个新集合 - Add a new collection in firebase when the user create account using uid of user in react js firebase实时数据库动态添加新节点的方法 - How to add a new node dynamically in firebase real-time database 添加新数据(不是更新)到 Firebase - Add new data (not update) to Firebase 如何在 firebase 实时数据库 javascript 中用新数据添加以前的数据 - How to add previous data with new one in firebase realtime database javascript Javascript Vue 3 - 在创建新的身份验证帐户到 Firebase Auth 后无法将图像上传到 Firebase 存储 - Javascript Vue 3 - Cannot upload image to Firebase Storage after create new authentication account to Firebase Auth 无法创建新的 Microsoft 用户 Firebase Auth - Unable to create new Microsoft user Firebase Auth 如何使用 flutter 向 firebase 添加新数据? - how to add new data to firebase with flutter? 将新的键值对添加到现有的 Firebase - Add new key value pair to existing Firebase 如何使用 Firebase 在组中添加新成员 - How to add new members in Group using Firebase
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM