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
- Realtime api and labels as permission
in my tables i set labels as permission and real-time capabilities stopped working. Before when i was having "any" role everything was working. Note: user have...
- Sveltekit + Bun sites runtime not deploy...
anyone tried deploying sveltekit + bun sites? its building but not running, and the only thing from build console to value is ``` > Using svelte-adapter-bun .s...
- Domain is owned by a different organizat...
I was trying to add a domain to one of my projects however, it keeps giving me the error of Domain is owned by a different organization. I did have a self hoste...