Hi Colin
yes you can, by implementing the plugin’s filters. To do the extraction you need to implement wfu_before_file_upload and wfu_after_file_upload filters and do the extraction using php. This is how:
if (!function_exists('wfu_before_file_upload_handler')) {
function wfu_before_file_upload_handler($file_path, $file_unique_id) {
$_SESSION['wfu_tempfiles'][$file_unique_id] = $file_path;
return $file_path;
}
add_filter('wfu_before_file_upload', 'wfu_before_file_upload_handler', 10, 2);
}
if (!function_exists('wfu_after_file_upload_handler')) {
function wfu_after_file_upload_handler($changable_data, $additional_data) {
if ($additional_data['upload_result'] == 'success' && isset($_SESSION['wfu_tempfiles'][$file_unique_id]) && $_SESSION['wfu_tempfiles'][$file_unique_id] != '') {
$file_contents = file_get_contents($_SESSION['wfu_tempfiles'][$file_unique_id]);
// perform here html extraction
// you can set javascript code to run in client browser using $changable_data['js_script']
}
return $changable_data;
}
add_filter('wfu_after_file_upload', 'wfu_after_file_upload_handler', 10, 2);
}
You can use Code Snippet plugin to add the following code in your website.
Inside wfu_after_file_upload_handler you can also perform user notification by sending an email. You can also run custom javascript code at user’s browser right after the extraction by setting $changable_data[‘js_script’] variable.
Nickolas