Get attachment in before_send_mail actionfilter
-
Hi there,
I need to get the attachment which is uploaded when sending the form, because I want to resend it to an API.
The problem: I cant seem to get the attachment.
Within my action code, theres this:$form_id = $contact_form->id();
$submission = WPCF7_Submission::get_instance();
$posted_data = $submission->get_posted_data();Within my
$posted_data
-Variable, I see the name of the attachment and all the other fields which are getting posted. So something is happening. But with$submission->uploaded_files();
, the array is just empty.As I said, I need to send the attachment to another API, so I need that before it get sent (and hence deleted) from CF7.
Anyone help please?The page I need help with: [log in to see the link]
- The topic ‘Get attachment in before_send_mail actionfilter’ is closed to new replies.