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
- Function running for more than 2 hours i...
This is my projectID: 669fe01b003800dd0503 Cloud functionID is 696ea05400147eb8eb3b I hope this doesn't count against my GB-hours?
- Session not found. Please run appwrite l...
I have encounter an issue with appwrite CLI They asking for a login session but in the doc, it’s mention that only setup client with endpoint / api key is enou...
- SELF HOSTING ISSUE, DATA NOT MIGRATING T...
Hey, devs, I recently tried to migrate my cloud instance to a self hosted version but my data is not transferred fully only the table structure is transferred ...