ideas icon indicating copy to clipboard operation
ideas copied to clipboard

Delete attached files when form entry gets deleted

Open wm-simon opened this issue 3 years ago • 1 comments

When you have a form with attached files, they get saved to the assets. That's fine, because now you can open the entry in the cp and see the attached files as well.

When you delete the form entry, the attached files are not deleted and it is not possible to make a difference between files from deleted and not deleted entries. It would be good to have the possibility to change this, that the attached files gets deleted with the form entry.

wm-simon avatar Aug 02 '22 10:08 wm-simon

Neat idea, though we'd have to be careful with this. Since assets can technically be used and reused anywhere, we'd probably need a way to check if the asset is used anywhere else before deleting, offering a confirmation message, etc.

jesseleite avatar Aug 04 '22 22:08 jesseleite

This will be addressed in Statamic v5. You'll be able to use the "Files" fieldtype for file uploads which shouldn't be stored on the server.

duncanmcclean avatar Apr 15 '24 16:04 duncanmcclean