Save files in a different folder instead of the Media Library
-
I’ve used the code below to select a different folder then the default Media Library for saving my uploaded files from the contactform7 form I’ve made.
function define_cf7_upload_dir( $fullFileName ){ $fileName = basename($fullFileName); //replace $myDir with your own folder $myDir = "./wp-content/uploads/wpcf7_uploads/"; $fullURL = $myDir . $fileName; return $fullURL; } add_filter('nmr_create_attachment_file_name', 'define_cf7_upload_dir');
This works well, the only problem I have is that somewhere it still files it as an empty icon in the Media Library and creates all the thumbnail versions as well.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.