WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: Contact Form 7] Failed to Upload File (WITH correct attchment field) (6 posts)

  1. RainCleans
    Member
    Posted 4 years ago #

    I have looked through the FAQ and suggested reading for CF7 and cannot find an answer to this question.

    I have attempted to attach a file using the [file your-file] and Email Attachment: [your-file] method with no results.

    Here is my code:

    <p>First Name*<br /> [text* first-name]</p>
    
    <p>Last Name*<br /> [text* last-name]</p>
    
    <p>Street Address* <br />[text* street-address]
    [text street-address2]</p>
    
    <p>City* <br />[text* city]</p>
    
    <p>State* <br /> [text* state]</p>
    
    <p>Zip Code*<br /> [text* zip]</p>
    
    <p>Your Email*<br /> [email* your-email]</p>
    
    <p>Confirm Email*<br /> [email* your-email2]</p>
    
    <p>Phone Number*<br /> [text* phone]</p>
    
    <p>Upload Resume: <br /> [file your-file]</p>
    
    <p>[submit "Submit"]</p>

    And within the "File Attachments" box I have written: [file your-file]

    However, whenever I attempt to submit the form it replys with "Failed to Upload File" in red font. I've looked everywhere and cannot figure this out.

    The plugin is working on other forms on my website. The link to this form is strategicmobilesolutions.net/recruitingcontact

    THANKS!

  2. Takayuki Miyoshi
    Member
    Posted 4 years ago #

    There seems to be two problems.

    And within the "File Attachments" box I have written: [file your-file]

    This should be [your-file]

    However, whenever I attempt to submit the form it replys with "Failed to Upload File" in red font.

    Probably the temporary folder for uploaded files is missing or not writable. Check your setting at Settings > Miscellaneous; "Store uploads in this folder" and there is writable wpcf7_uploads folder under the specified folder.

  3. RainCleans
    Member
    Posted 4 years ago #

    My mistake-I have written "[your-file]" (without quotes) in the file attachments box, I just mistyped here.

    I looked into Settings > Miscellaneous; "Store uploads in this folder". It was sending to something odd, so I made a new folder within WP-content > plugins > contact form 7 and named it "wpcf7_uploads". I then made sure this folder is writable and readable.

    I saved the changes under Miscellaneous, and went back to the form on my site to see if a 200kb .doc file would attach. Same error-in red it says "Failed to Upload File" and in yellow at the bottom of the page it says "Validation errors occurred. Please confirm the fields and submit it again."

    Does the upload folder need to be in another directory?

    Thanks again!

  4. Takayuki Miyoshi
    Member
    Posted 4 years ago #

    It should be another directory. It's not good idea to have temporary file folder in plugin folder.

    For example, set up "Store uploads in this folder" as wp-content/myfiles, then create wp-content/myfiles/wpcf7_uploads and make it writable. Try it.

    Basically Contact Form 7 creates the folder for you if it's allowed. You need to do it manually only when the parent folder is not writable.

  5. RainCleans
    Member
    Posted 4 years ago #

    I did what you instructed above.

    1) I created a new folder, "myUploads" within wp-content. This folder is read/write.
    2) Within "myUploads" I created "wpcf7_uploads" and granted read/write.
    3) I went to settings > miscellaneous and changed the upload directory to 'wp-content/myUploads/wpcf7_uploads" .

    After all of this, I am still left with the same error message described above. I'm sorry this is so repeditive, I'm just completely at a loss. If it matters, I am hosted on a GoDaddy Windows server and did have to use the 'WP-Mail-SMTP' plug-in to get CF7 functioning correctly on my server.

    EDIT:

    1) I have also noticed that upon my most recent test, when the upload failed it appended "#wpcf7-f7-p504-o1" to the end of the web address line.
    2) I have also attempted to set settings > miscellaneous to "wp-content/myUploads/" without any luck.

  6. Takayuki Miyoshi
    Member
    Posted 4 years ago #

    Can I see the page? strategicmobilesolutions.net/recruitingcontact seems not found now.

    And, what plugins are you using? Could you list them all?

Topic Closed

This topic has been closed to new replies.

About this Topic