(trunk - 5.1-alpha-44286)

/** * Filters the data for a file before it is uploaded to WordPress. * * The dynamic portion of the hook name, `$action`, refers to the post action. * * @since 2.9.0 as 'wp_handle_upload_prefilter'. * @since 4.0.0 Converted to a dynamic hook with `$action`. * * @param string[] $file An array of data for a single file. */$file=apply_filters("{$action}_prefilter",$file);// You may define your own function and pass the name in $overrides['upload_error_handler']$upload_error_handler='wp_handle_upload_error';if(isset($overrides['upload_error_handler'])){$upload_error_handler=$overrides['upload_error_handler'];}// You may have had one or more 'wp_handle_upload_prefilter' functions error out the file. Handle that gracefully.if(isset($file['error'])&&!is_numeric($file['error'])&&$file['error']){