Disable Auto Delete of uploaded files
-
Hi, I tried to disable auto-deletion of uploaded files, like this:
function mtx_remove_action_auto_delete_files() { remove_action( 'template_redirect', 'dnd_cf7_auto_clean_dir', 30); } add_action('plugins_loaded', 'mtx_remove_action_auto_delete_files', 30, 1);
and
add_filter('dnd_cf7_auto_delete_files', 'cf7_adjust_auto_file_deletion'); function cf7_adjust_auto_file_deletion( $time ){ $time = 31536000; return $time; }
unfortunately this code does not work
the file is deleted from the temporary folder, and the folder itself is the same
does not affect and change the date by more (seconds)
latest WP version 5.7.2
are there any alternatives?after all, with this function, the module is practically useless if files are deleted automatically after a few hours, without the option to disable
there are analogs of modules (at least 2 more pieces), where this is solved, but I am clarifying whether it is worth using this
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Disable Auto Delete of uploaded files’ is closed to new replies.