• Hello,
    I have been using contact form 7 for over a year.
    I am using a homemade theme and my version of the plugin and WordPress is the latest.
    Recently I am getting corrupted attachments. They have a size of 0KB.
    It’s random and I can’t recreate the problem myself.
    I’m sure it comes from this plugin because I save the attachments (Functionality set up for debugging) on the server before sending them by email.
    It’s very annoying for my activity. Do you have an idea of the problem ?
    Thank you

    • This topic was modified 5 years, 5 months ago by virtazp.
Viewing 1 replies (of 1 total)
  • Hola @virtazp,

    When working with file fields in Contact Form 7, I like to use the Drag and Drop Multiple File Upload plugin extension.

    This plugin allows you to add a custom number of files per field. In addition, you can choose to store the files temporarily on your site and access them through a link, rather than attaching them directly by mail, which is the default behavior (and it is usually very limiting when you expect files larger than 20MB).

    What you should know is that this option deletes the files after 60 min. To disable this, you should add a code snippet to the functions.php file of your current theme or to a custom plugin:

    // DRAG AND DROP MULTIPLE FILE UPLOAD
    // Disables file deletion of form entries
    function dnd_remove_action_auto_delete_files() {
      remove_action( 'template_redirect', 'dnd_cf7_auto_clean_dir' );
    }
    add_action('plugins_loaded','dnd_remove_action_auto_delete_files');

    Although this plugin has a premium (paid) version, I have never used it. The free version should be more than enough for most cases. I hope you find it useful

    Best regards,
    Yordan.

Viewing 1 replies (of 1 total)

The topic ‘unstable upload file’ is closed to new replies.