WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
[resolved] Failed to upload file - Updated wp-config.php & dir writable??? (3 posts)

  1. JMay-Chang
    Member
    Posted 1 year ago #

    Having an issue with uploading files. I have read all the docs and I think I have it set up correctly.

    Here is the configuration:

    Form Config Code
    [file file-374 limit:10mb]

    Mail Setting code
    [file-347]

    Before I placed the below recommended code in the wp-config.php, the form would send the email without error but the file was not attached.

    Now since adding the below code code to the wp-config.php...

    define( 'WPCF7_UPLOADS_TMP_DIR', 'http://mydomain.org/wp-content/uploads/wpcf7_uploads' );
    NOTE: Both /uploads and /wpcf7_uploads directory attributes are set to 777 (writable)

    ...the message will no longer validate and returns a "Failed to upload file" error.

    I am fairly certain I have the config correct but obviously I have missed something or there is some kind of conflict.

    Thanks for any help sent my way!

    http://wordpress.org/extend/plugins/contact-form-7/

  2. JMay-Chang
    Member
    Posted 1 year ago #

    UPDATE: Now no matter what directory or path I am using for the upload temp folder I am getting this message on the form config page.

    "This contact form contains file uploading fields, but the temporary folder for the files (/uploadtemp) does not exist or is not writable. You can create the folder or change its permission manually."

    I have verified all the folders I have tried are writable with my host file manager AND in FileZilla. I do have many files already in the Uploads folder so I have successfully uploaded files to the /wp-content/uploads directly outside of Contact Form 7 so I know wp-content/uploads is writeable but I get the same error with that directory as well.

    Go figure!

    I thought I would uninstall and reinstall the plugin but I have several forms I do not want to loose.

    Any suggestions?

  3. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 1 year ago #

    Form Config Code
    [file file-374 limit:10mb]

    Mail Setting code
    [file-347]

    374, 347

    define( 'WPCF7_UPLOADS_TMP_DIR', 'http://mydomain.org/wp-content/uploads/wpcf7_uploads' );

    You have put an URL where a file path is required. See File Uploading and Attachment.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic