• Resolved gova_dev

    (@gova_dev)


    Hey there, some weird behavior is going on with my wordpress and i’m not entirely sure where to start so i guess here would be my best bet.

    WP VERSION: 4.0
    UPLOAD FORM TESTED: 3.9.3 & 3.0

    Problem:
    Using the upload option in contact-form 7, upload a file. Form submits without errors, but the file does not get uploaded.

    Given:

    1. The upload folder has a 777 permission
    2. The wpcf7_uploads folder has a 733 permission
    3. plugin/modules/file.php wpcf7_file_validation_filter’s move_uploaded_file section returns a success

    I have no idea what to do. Please and thank you.

    https://wordpress.org/plugins/contact-form-7/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Thread Starter gova_dev

    (@gova_dev)

    Thanks for the reply. Unfortunately, i have read through that page section before i came to ask for help.

    Let me expound a bit more on the problem.

    Additional Givens not mentioned earlier:

    1. The “upload” does get sent. The form is even able to read the file name. The bytes etc. BUT even if it does. After the sending of the email, the file does not get uploaded into the folder.
    2. I’ve tried checking the default folder, and even changing the upload path both through wordpress and by opening the plugin files, neither helps.
    3. The wordpress built in uploader works

    Summary
    The problem is. The server returns a “success”, saying that it has uploaded the file when in reality it has not.

    The file is uploaded temporarily, and is removed. This is from the link Takayuki Miyoshi shared.

    “After a user uploads a file through your contact form, Contact Form 7 checks to see if: 1.) Any PHP errors have occurred; 2.) the file type and file size are valid; and then, if the check turns out okay, Contact Form 7 moves the uploaded file to a temporary folder. At this point, Contact Form 7 attaches the file to the mail and sends it. After these procedures, Contact Form 7 then removes the file from the temporary folder.

    You can modify the CF7 and keep it from doing so. See:
    https://wordpress.org/support/topic/change-how-file-upload-works?replies=3
    However there is a caveat: If you update the plugin, the changes you have made to the plugin will be lost.

    If there is a better/more secure/safer way of changing the functionality of CF7, it would be great if Takayuki Miyoshi would comment on it.

    Thread Starter gova_dev

    (@gova_dev)

    mozrelic that is really helpful, i have not tested/fixed it but atleast i know where to go from here.

    Thread Starter gova_dev

    (@gova_dev)

    definitely was looking for this one. thanks!

    Thread Starter gova_dev

    (@gova_dev)

    *resolved*

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Upload is successful but the file does not get uploaded’ is closed to new replies.