add_filter( 'sanitize_file_name', 'wnt_media_upload_random' );
function wnt_media_upload_random($filename) {
	$info = pathinfo($filename);
	$ext  = empty($info['extension']) ? '' : '.' . $info['extension'];
	$name = basename($filename, $ext);
	return substr(md5($name), 0, 20) . $ext;
}