Back

[SOLVED] How can I connect a storage file with a collection entry?

  • 0
  • Self Hosted
  • Databases
  • Web
  • Storage
pix3l
12 Mar, 2024, 21:40

Hey, I would like to connect a storage file with a collection entry. Imagine an Instagram clone, where I have a "post" collection, that has "tags", "description" and so on. And now I need to add the picture to that post. How can I do that?

TL;DR
Developers asked how to connect a storage file with a collection entry, wanting a relational approach like with other collections. They were advised to fetch the file ID and add it as a string in the database.
D5
12 Mar, 2024, 21:45

You can get the file ID and add it to the database as a string

D5
12 Mar, 2024, 21:46

So with the ID you fetch then the image when needed to display it to users

pix3l
12 Mar, 2024, 21:56

ok I see.. I was hoping to be able to do some kind of relation, as you can do with other collections

pix3l
12 Mar, 2024, 21:56

[SOLVED] How can I connect a storage file with a collection entry?

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