
I am creating a blogging platform where user can post their own images into a bucket. User can also see their list of files. Currently I list all user's file by using storage.listFiles. It worked perfectly, but then I realized user B can also see fetch what user A uploaded. If I made the bucket into "private" and remove anyone to read (set its permission specifically to only use File Permission), then guests cannot see the images inside the post.
Is there any way where user can upload the image file to be publicly available for viewing but not added into storage.listFiles?

What's your concern about the list files?

I simply don't know how to list only what's uploaded by currently logged in user

when I used listFiles, it basically list all of the file instead of files that we own 🙀

People typically use a database collection for additional data about a file. In this collection, you can have a createdBy attribute and put the id of the user. Then, you can use list documents with a query to filter by createdBy

I see... so I need to record when a user upload something with trigger
Recommended threads
- Struggling with Sessions
Understanding check: createAnonymousSession() registers the session with the backend setSession() creates a cookie on the user’s computer(?) getSession(‘curr...
- MCP and VSCode Docs
I like your tools, but would like to set up Copilot in VSCode, but these docs don't offer that guide. Did I miss something? https://appwrite.io/docs/tooling/mcp
- How to set wildcard at custom doamin
For OAuth2 redirect, I have set the appwrite api endpoint as appwrite.example.com, and added the CANME in cloudfare where I bought the domain name. And I hosted...
