Supabase Storage
#31332
Replies: 1 comment 1 reply
-
You would need to use storage list API call with the folder set to the user id. Then use the returned array to get an array of pathnames to call the delete API call with. If you changed from using folders to buckets with UUID in the name then you could just delete the bucket with an API call. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Guys, I have a question i am creating a platform where i can post image based the User ID which means each user will have a folder created with their user id and under the folder will have their uploaded media files as shown in the policy below.
((bucket_id = 'profiles'::text) AND (( SELECT (auth.uid())::text AS uid) = (storage.foldername(name))[1]))
here is the code for how i upload media to the storage using nuxt3
Now how i delete the media in the folder in the storage?
Thank you very much.
Beta Was this translation helpful? Give feedback.
All reactions