Back

Store custom data in bucket JSON

  • 0
  • Storage
_alnes_
24 Apr, 2024, 10:53

Hey ๐Ÿ™‚

Why is there no Data (string array...) field in the bucket object? There you could, for example, save user.id/user.names of the user who uploaded the image etc.

I know I could simply create a second database/collection and maintain this data there, but I don't quite understand why this should be best practice?

I now save the username and id as a filename and work with substring for the client.

Thanks ๐Ÿ™‚ alnes

TL;DR
To store custom data in a JSON bucket, you can utilize a separate database/collection instead of adding a 'Data' field directly to the bucket object. This practice is recommended for better data management and organization. Instead of manipulating filenames, consider using a database to store and retrieve user-related information efficiently.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more