Hey,
Thanks for your quick reply.
I tried to comment out that entire section:
/*function wpcf7_cleanup_upload_files() {
$dir = trailingslashit( wpcf7_upload_tmp_dir() );
if ( ! is_dir( $dir ) )
return false;
if ( ! is_readable( $dir ) )
return false;
if ( ! is_writable( $dir ) )
return false;
if ( $handle = @opendir( $dir ) ) {
while ( false !== ( $file = readdir( $handle ) ) ) {
if ( $file == "." || $file == ".." || $file == ".htaccess" )
continue;
$stat = stat( $dir . $file );
if ( $stat['mtime'] + 60 < time() ) // 60 secs
@unlink( $dir . $file );
}
closedir( $handle );
}
}
if ( ! is_admin() && 'GET' == $_SERVER['REQUEST_METHOD'] )
wpcf7_cleanup_upload_files();*/
But nothing seems to work. I can't find the uploaded file in the wpcf7_uploads folder. I think once you upgrade to PHP 5, it breaks that functionality (ability to delete that functionality).
I also changed the dir thinking it would allow me to change location of uploads:
function wpcf7_upload_tmp_dir() {
if ( defined( 'WPCF7_UPLOADS_TMP_DIR' ) )
return WPCF7_UPLOADS_TMP_DIR;
else
return wpcf7_upload_dir( 'dir' ) . '/submissions';
}
It used to say:
return wpcf7_upload_dir( 'dir' ) . '/wpcf7_uploads';
But nothing seems to work. The files still delete... to be honest I never even see the files in the temp folder (I used to be able to see them for about 60 secs)...
Let me know when try using PHP 5; maybe PHP 5 has a built-in email work around that doesn't need a temp folder to hold attachments.