• My web developer has disappeared and I can’t figure this out on my own. When users submit files through my form, I receive a link to download the file, but the file has been renamed with a string of random letters or numbers. Clients often send me multiple files and give me directions referring to each file by name, but then I receive files with different names! Can I stop the the form from renaming my files?

    Also, about 25% of the time I get a file that won’t open and has zero bytes as it’s file size. That’s a separate, but equally important problem. Any help on either of these issues would be greatly appreciated!

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hello @byallmeansgraphics,

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

    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 ‘How to stop form from renaming file attachments’ is closed to new replies.