0
  1. How to store a link to a file uploaded to the Firebase Storage?
  2. How to store a link to a user?
  3. How to store user data? In a separate table or in additionalUserInfo.profile?
Developer
  • 131
  • 1
  • 7

1 Answers1

0

To refer to a file in Cloud Storage for Firebase, you have two common options:

  1. You can store the relatively path to that file in storage, and then access the data using the SDK. When accessing the file this way, you can control who has access to the file through security rules.
  2. You can store a so-called download URL for the file, which gives everyone public read-only access to the file.

To refer to other users, you'll typically store the UID for those users. These are public identifiers for the users, similar to how your Stack Overflow ID is 8638415. Also see Firebase - Is auth.uid a shared secret?


Storing additional information is typically done in a database, such as Firestore or Realtime Database that are part of Firebase. This has been covered quite a few times before, so I recommend searching for previous questions on it.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807