Storage: delete user folder using edge functions
Hey,
I've followed this article to implement an edge function allowing users to self-delete their accounts - https://blog.mansueli.com/supabase-user-self-deletion-empower-users-with-edge-functions
However, I've noticed that in this example, when deleting the user files from storage, we need to build a list of urls first and then delete them.
Assuming that each user in my project has his own separate folder inside the storage bucket (named with his userId), is it possible to just remove the whole folder at once? (like we would do it in the dashboard). If not, then how to make sure that ALL of the files are deleted? I've seen that there are some limits to how many urls we can retrieve.
Thanks in advance
I've followed this article to implement an edge function allowing users to self-delete their accounts - https://blog.mansueli.com/supabase-user-self-deletion-empower-users-with-edge-functions
However, I've noticed that in this example, when deleting the user files from storage, we need to build a list of urls first and then delete them.
Assuming that each user in my project has his own separate folder inside the storage bucket (named with his userId), is it possible to just remove the whole folder at once? (like we would do it in the dashboard). If not, then how to make sure that ALL of the files are deleted? I've seen that there are some limits to how many urls we can retrieve.
Thanks in advance