Support » Plugin: Contact Form 7 » [Plugin: Contact Form 7] File uploading to specfic folder

  • Hi,

    Is there any way that when an end user uploads a file through the contact form plugin, it is uploaded to a specified folder on the web server? We would like users to upload mp4 files and restrict the file uploading to only these, but using the current functionality wouldn’t work sending an email to the admin with the file attached, seeing as video files are somewhat large. Alternatively, if a direct link to the file in an upload folder is specified in an email that would work just as well instead of sending it as an attachment.

    Also, can I restrict the file upload types?

    Thank You,

Viewing 4 replies - 1 through 4 (of 4 total)
  • Bradley,
    I am having the exact same need… (for pdf files, but it doesnot change the need in itself): I would like to retrieve uploaded files, but they are apparently deleted after upload: how is it possible to back these up or just retrieve them?

    That’s a good question! It would be helpful to receive a response from someone that has experienced this same scenario and has found a solution. Thanks in advance!
    Here is written that the Files are temporary uploaded and deleted.
    Also how the upload directory is changed.
    Now you need to find out how not to delete the temporary files.

    I just came to see if anyone had a solution to this same question.

    After a bit of nosing around in the code, the solution is to edit the following file:

    Search the file for @unlink (there’s only one instance of it) and comment out the loop:

    foreach ( (array) $this->uploaded_files as $name => $path ) {
        @unlink( $path );

    within the submit function. Job’s a good ‘un.

    This solution is for version 3.1.2 running on WP 3.2.2

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Contact Form 7] File uploading to specfic folder’ is closed to new replies.