Hi everyone, can someone tell me what is the preferred way of accesssing user only files from storage in react native?
I saved the file with user only read permissions but Im not sure how should we access this file on the client side? getFileView() just returns the plain url and no user information
could you clarify which type of user data are you expecting from the files? like who uploaded it?
not really user data per se, but i would expect this to already have a token or something so that the client can read it. Or do we need to add that our selfs?
Sorry but could you clarify what kind of data you want client to be able to read? Btw the files dont contain any type of user data with it if you want like who uploaded it type function, you would have to create a table to keep track of it.
ok maybe i wasnt really clear. My goal is to read a file on the client side that has user only read permission, ie only user id 123 can read it since they uploaded it. Now, i created the file with that permission and its fine, however, i dont know how can i read it on the client side later?
you can use listFiles as getfiles method will require ids which in normal case a client side wont have track of./ using listFiles will fetch some files (by default 25 , you can increase or decrease the a amount) which the current user has read permission. the other which this current user does not have permission of , no data will be fetched. you can add another filter layer by keeping track of the files name , type, tags by creating a table . which makes querying files much easier
Recommended threads
- Relation Question
How do I create a relation from table y to an others x.$id. in my example I have a users table where I use Appwrites unique User IDs and I want other tables fo...
- Unknown attribute type: varchar / text
Since the `string` type is deprecated I tried using `varchar` and `text` in some newer tables, but when running `appwrite pull tables && appwrite types ./src/li...
- I'm experiencing a critical bug on Appwr...
Hey <@870607367597850624> team / support đź‘‹ I'm experiencing a critical bug on Appwrite Cloud that's blocking my production Flutter app. I've already filed GitH...