Back

Labels for files

  • 0
  • Storage
bladisty
7 Mar, 2024, 02:54

Is there a way to add labels to files so I can in turn search for files based on these labels? Basically trying to link files to the user that uploaded them. I would prefer not to create different buckets for different users.

TL;DR
Developers want to add labels to files for easy searching without creating multiple buckets. One solution is to create a collection with documents containing the file ID and desired label, then use these labels to search for files by ID in the bucket.
BloodThermic
7 Mar, 2024, 02:59

I dont belive so the way you want. You can create a collection with a document for each file that has the fileId and the label you want for that fileId then you can search the documents for the label then get the fileId and search the bucket for that ID

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