Replies: 1 comment
-
It is the responsibility of the developer to delete these files from the disk if they are removed, as Filament is unaware if they are depended on elsewhere. One way to do this automatically is observing a model event. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Package
Form builder
Package Version
v3
How can we help you?
Hi everyone!
I’m working on a Laravel project using Filament (v3) and leveraging the Rich Editor (or Markdown Editor) for content management. When users upload files (e.g., images) as attachments, the files are stored in the storage (e.g., storage/app/public/uploads), but only the file URLs are embedded in the HTML/Markdown content saved in the database.
This creates a problem:
Orphaned Files: When a record is deleted, the attached files remain in storage because they are not directly linked to the database record.
I’m looking for an efficient and automated solution to Delete attached files when the corresponding record is deleted.
Beta Was this translation helpful? Give feedback.
All reactions