Is it possible to set/get the owner of a file usin...
# help
c
Is it possible to set/get the owner of a file using the storage API (with service_key is fine)? Looking at the source code in supabase/storage-js I think the owner must be controlled by the headers, but I'm not sure... There are commented out functions for getMetadata and updateMetadata, but I don't know if those should be available or not (since they're commented, I mean via a direct fetch rather than via supabase.storage.getMetadata or similar...) I'm assuming there is some concept of ownership, since I can use things like
(uid() = owner)
in RLS policies... The goal is to create user profiles with avatars when transferring from a previous site - I can create the users but I don't want to have their images be owned by some sort of admin role...
n
Hello @chrisb2244! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
/title
command! We have solved your problem? Click the button below to archive it.
🆕 Set the owner of a file in Storage
g
When you use the storage API the owner is decided by your authorization header which is a jwt token. If you look in the storage schema at the object table you will see an owner uuid column. You should be able set that with database calls with a UUID after a file is uploaded.
n
Set the owner of a file in Storage