• 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!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hello @nortun

    Hope you’re doing well today! Thank you for reaching out to us.

    I tested the MU-Plugin snippet that you have shared on my lab site and it worked just fine. I see that it was able to delete the uploaded file after sending it via email as an attachment.

    However, just for information, the MU-Plugin will work only for single uploads, in case there are multiple uploads enabled, it will not work.

    Additionally, just to be sure, could you please confirm if you also updated the correct form ID on the mu-plugin besides the comment that says –
    //Add your comma-separated form IDs here

    That said since this will need some level of customization to the existing plugin functionality and will require custom coding, it will be out of our support scope, I am afraid.

    For that, you’ll need to hire a developer to provide the required custom code for you. WordPress provides a jobs directory here https://jobs.wordpress.net/, if you need further advice about it, feel free to email [email protected].

    Hope this helps.

    Kind Regards,
    Patrick Freitas

    Thread Starter nortun

    (@nortun)

    Hi Patrick,

    Thank you for clarifying. I understand this might go beyond the support scope, but I was wondering if you could point me to any resources, documentation, or examples that might help me adapt the code for forms with multiple file uploads.Your help is much appreciated!

    Best regards!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.