Contact form 7 file upload creates random folder and stores uploads inside that.
-
Hi All,
I’m using contact form 7 as a way of uploading files from the form directly to the drop box.
I’ve read that contact form 7 stores the temporary files inside “wp-content/uploads/wpcf7_uploads” on form success and then deletes them straight after the form request is done. This is all working and I can see it happening when I post a form. However…
I was expecting the file to go directly inside the “wpcf7_uploads” folder where I could then access the file just before it gets removed, this is not the case. Instead, contact form 7 creates a folder inside the “wpcf7_uploads” with what appears to be a random name, stores the upload in there and then removes it. I managed the capture one of these folders names temporarily and it was just a random series of numbers.
Does anyone know how contact form 7 creates this folder, and how do I access it. I’ve tried dumping out the entire form submission by doing:
$submission = WPCF7_Submission::get_instance(); if ( $submission ) { $posted_data = $submission->get_posted_data(); }
but it does not reference the folder name being creates anywhere. In an ideal world, i want to stop this additional level deep folder being created so I can access the temporary uploads then send them to dropbox. Thanks
- The topic ‘Contact form 7 file upload creates random folder and stores uploads inside that.’ is closed to new replies.