Automatically Deleting Uploaded Files After Form Submission
-
Hello,
I need help with an issue regarding the Forminator plugin and GDPR compliance. Specifically, I am trying to automatically delete files uploaded through a Forminator form after they are sent via email notification, to avoid them being stored on the server indefinitely. The files are currently saved in the directory: wp-content/uploads/forminator/…
Here’s what I’ve already tried:
1. Implementing an MU plugin using code from this Gist: https://gist.github.com/wpmudev-sls/7a32dc5407324cc902f8b9ad8970ef62, which was provided in a past forum thread.
2. Adding custom code to functions.php that triggers a CRON job to delete the files.
3. Various combinations of the above to trigger automatic file deletion after submission.
However, despite these attempts, the files still remain in the uploads folder after submission. Additionally, when using the MU plugin, the form submission fails to send. Other methods didn’t trigger the deletion as intended.
I’ve searched for solutions in existing forum threads and resources but haven’t found any that work or fully address this issue. If anyone has successfully managed to implement a solution or has any suggestions, I’d be grateful for your input.
Thanks in advance for your assistance!
- You must be logged in to reply to this topic.