© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
1 reply
Martin

Trigger storage delete on row delete

Hi!
I have a db table "attachments" with a "url" column, which is the local path (the path returned when uploading file) within a storage bucket called "courses".
I want a trigger with a function that, when an attachment row is deleted in the database, then it should automatically delete the file using the "url" property of the attachment. I've tried getting this to work, but have had no success. Does anyone have ideas or got this to work?
Thanks!
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

Cannot Delete Row
SupabaseSSupabase / help-and-questions
4mo ago
Selecting Row After Trigger
SupabaseSSupabase / help-and-questions
4y ago
Row won't delete
SupabaseSSupabase / help-and-questions
3y ago
Delete Folder in Storage
SupabaseSSupabase / help-and-questions
4y ago