Back

[Solved] Avatar/Gallery page per-user

  • 0
  • Databases
  • Storage
fafa
21 Nov, 2023, 13:39

Heyo,

What would be the best way for avatars/gallery support per user? How would you link that exactly? c:

I would like:

  • Per-user gallery
  • Total gallery (all images)
  • Avatar (profile images) per user
TL;DR
The user is looking for a solution to implement an avatar and gallery page per user. They discuss different ways to store and associate images with user profiles and galleries. The recommended solution is to create two collections: one for user galleries and another for gallery images. They suggest using Appwrite's relationship feature or manually creating relationships between the two collections. No specific solution is provided, but the user can refer to the Appwrite documentation on database relationships for more information.
Ernest
21 Nov, 2023, 13:45

You can use a db collection to store users and their related images for the gallery

fafa
21 Nov, 2023, 13:50

How would you exactly set their related images?

Ernest
21 Nov, 2023, 13:59

There are a number of ways to accomplish it. For example you could have a collection called user_galleries with the following attributes gallery_name, and user_id and in this collection you'd store the galleries for each user. Then you'd have another collection gallery_images with attributes gallery_id and image_id which would store the images associated with each gallery. You can create relationships between collections with appwrite's relationship feature or do it manually.

fafa
21 Nov, 2023, 14:00

Sad that there's no better way to connect images.

Ernest
21 Nov, 2023, 14:05

How so? It's standard practice to store files (images) in buckets and associate them to the relevant data in collections with their id (or path)

Ernest
21 Nov, 2023, 14:06

Storing files as blobs in dbs is generally not the best

fafa
21 Nov, 2023, 14:07

hmm

fafa
21 Nov, 2023, 14:07

Thanks, I'll try it out!

Ernest
21 Nov, 2023, 14:08

All right, all the best

fafa
21 Nov, 2023, 19:24

[Solved] Avatar/Gallery page per-user

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