FeatureFuel
7

Feature Request: Native Storage File Deletion Trigger on Row Delete

Source: supabase/supabase#36755 · opened by @aress31
It would be extremely helpful if Supabase Storage could natively support automatic file deletion when a related database row is deleted (e.g., via a Postgres trigger or RLS policy). Currently, this requires a workaround using the http extension in a trigger or handling file deletion in application logic, which adds complexity and maintenance overhead.

Use case:
• When a row referencing a file (e.g., in a templates or uploads table) is deleted, the corresponding file in Supabase Storage should also be deleted automatically.
• This would help keep Storage clean and prevent orphaned files.

Current workaround:
• Use a Postgres trigger with the http extension to call the Storage API, or
• Handle file deletion in backend/app logic after deleting the row.

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests