© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
6 replies
benyi3k

Delete Folder in Storage

I have this problem:
await this.orderSvc.deleteAttachment(${this.order.branch_id}/${this.order.id});

async deleteAttachment(path: string) {
return new Promise(async (resolve, reject) => {
let { error, data } = await this.supabase.storage.from(this.from_attachments).remove([path]);
if (error) {
reject(error);
} else {
resolve(data);
}
});
}

I create a folder with the branch_id, and then a child folder with the order_id, and inside i upload the files. But when I trigger remove([path]) to remove the order_id folder, is not deleted.
Is this way to do it or there's a better way? Thank you!
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Storage: delete user folder using edge functions
SupabaseSSupabase / help-and-questions
6mo ago
Storage or folder
SupabaseSSupabase / help-and-questions
4mo ago
Trigger storage delete on row delete
SupabaseSSupabase / help-and-questions
3y ago
I can't delete folder in dashboard
SupabaseSSupabase / help-and-questions
8mo ago