Hi,
Here is my solution (if like me you only have 1 file field in your form).
There is 2 issues with this plugin since CF7 5.4 :
1) CF7 changed the upload field to an array (lunacodes’ error)
2) The WPCF7_Submission::get_instance()->uploaded_files() method stopped returning the uploaded files
To fix these issues, you have to edit the extension’s code :
Issue 1
In the nmr_create_attachment function, add this code on first line (before checking the filetype) :
if (gettype($filename) == 'array') { $filename = reset($filename); }
Issue 2
In the nmr_on_before_cf7_send_mail function, replace :
$uploaded_files = $submission->uploaded_files();
By
$posted_data = $submission->get_posted_data();
$uploaded_files = $posted_data['File'];
/!\ where File is the exact name of your file field on CF7
Source : https://stackoverflow.com/questions/66933665/how-to-process-uploaded-images-in-new-5-4-version-of-contact-form-7-solution
-
This reply was modified 3 years, 10 months ago by
swissboy1984.
-
This reply was modified 3 years, 10 months ago by
swissboy1984.