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
- total parameter not working correctly in...
Hello Appwrite team, I'm experiencing issues with the total parameter in the listRows() method (TablesDB) across multiple SDKs. **Issue 1**: Node.js SDK (node...
- Confusion around Tables / TablesDB vs Da...
Hello everyone, I ran into quite a bit of confusion when trying to migrate a Function from Databases.createDocument() to the new Tables / Rows API and wanted t...
- Free plan Usage
I using a free plan with one organization. I have three projects but on the free plan I should be able to have 2 projects running But in my case only 1 out of ...