Clean up attachments from incomplete form uploads#7510
Conversation
PR Summary
|
Tag file uploads with pending meta on AJAX upload, remove the flag when the form is saved, and schedule a daily cron to delete attachments that remain flagged and are older than 12 hours. Fixes pods-framework#7459
813b1d0 to
e40872c
Compare
Summary
_pods_pending_form_uploadpost meta (timestamp) when uploaded via AJAX inPods->form()PodsField_File::save()Fixes #7459
Test plan
$pod->form()_pods_pending_form_uploadmeta is set on the attachmentdo_action('pods_cleanup_pending_form_uploads')) with a backdated timestamp — verify the attachment is deleted