Copying uploaded images not working in wordpress
I am trying to copy an image uploaded using Contact Form 7 to the uploads directory but this only produces an empty jpeg file with 0644 permissions even though the dev directory and the uploads directory have 777 permissions while I try to solve the problem.
I have had this particular set-up working, at least with the version of CF7 current in January 2017 but I cannot fathom why the copied images are always 0-byte files.
The files are all correctly uploaded to Contact Form 7/Flamingo's wpcf7_uploads directory, which resides inside the standard uploads directory, so that's not the problem. It's copying them to another directory so I can rename them and display them that isn't happening.
Just to re-iterate, since I can't seem to update via comments, as far as Contact Form 7 is concerned - and its sibling Flamingo plugin, which allows for saving of uploaded info/images as opposed to simply forwarding and then deleting them - both are playing their part excellently, uploading and saving the images, at least once the line
$this-remove_uploaded_files();
is commented out (/plugins/contact_form-7/includes/submission.php, line 223, in the submit() function. The problem is simply that attempting to copy the files into a custom directory outside of wp-content fails, and produces 0-byte jpeg images.
Topic plugin-contact-form-7 uploads permissions Wordpress
Category Web