• I think i didn’t get the file upload logic of CF7. My assumption was the file is being emailed + saved on the server. Now i am not sure about the latter.

    How can i save a copy of the uploaded file??

    guessing we must edit/hook modules/file.php around line 180

    if ( false === @move_uploaded_file( $file['tmp_name'], $new_file ) ) {
    		$result['valid'] = false;
    		$result['reason'][$name] = wpcf7_get_message( 'upload_failed' );
    		return $result;
    	}

    or maybe in the function wpcf7_cleanup_upload_files() {?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter DDT

    (@ddt)

    ok i added the following, don’t like to edit the plugin src but deadline issues.

    around line 185 in file.php i added
    @copy($new_file, "/var/www/html/site/wp-content/uploads/folder-to-save/".$filename);

    not the way but it works for now

    Oh, my goodness. This is what I needed! Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘How to save a copy of uploaded file on server besides emailing?’ is closed to new replies.