https://supabase.com/ logo
#help
Title
# help
t

TMShader

03/21/2022, 1:37 PM
Is is possible to create a policy that a user can upload an image or modify that image, but only if it matches their uuid ?
n

Needle

03/21/2022, 1:37 PM
Hello @TMShader! 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.
o

Olyno

03/21/2022, 2:11 PM
Hi Yes you can, check the examples policies on the dashboard directly
n

Needle

03/21/2022, 2:11 PM
TMShader (2022-03-21)
t

TMShader

03/21/2022, 3:28 PM
I couldn't figure it out, can you please help a bit more?
o

Olyno

03/21/2022, 4:41 PM
In the Authentication part > Policies > New Policy (on the table you want) > Get Started quickly > Enable delete access for users based on their id Then just edit it and it's done
t

TMShader

03/21/2022, 6:17 PM
I think you misunderstood, I want to upload images to the storage and use
{ upsert: true }
but I get an error because a file with that name already exists, also a user can upload an image with any name
n

Needle

03/22/2022, 12:39 PM
Thread was archived by @TMShader. Anyone can send a message to unarchive it.