Contact form 7 uploads

Hi there,

I am facing an issue with contact-form-7 plugin and file upload.
It looks like the file is not uploaded and therefore not attached to the email.

I wonder if it is because the content directory has been moved under bedrock.
Looking at the contact-form-7 documentation, here is what I noticed

You can set the constant value to an absolute directory path or a relative path to the WordPress content directory (WP_CONTENT_DIR ). Be aware that, even in cases where you set it to an absolute directory path, you can only specify a directory that is located under the content directory. Otherwise, the constant will be ignored.

https://contactform7.com/file-uploading-and-attachment/
https://contactform7.com/configuration-errors/file-not-in-content-dir/

Did some of you also experienced the same issue or am I missing something ?

Thanks

I finally solved this issue.
It was also related to the fact that in production, I am using atomic deployment and upload folder as a symlink outside WP_CONTENT
so I had to define the constant in my env file like
WPCF7_UPLOADS_TMP_DIR=‘app/uploads/wpcf7_uploads’

2 Likes

Hi ! same problem. Files are not under the wp-content directory. Could you tell me in which file and where in the file you changed the constant ? Has it been ignored after your change ?
thanks !