I answered this for you in the comments of your previous question.
…you can use the filter that @Backie
suggested above
(intermediate_image_sizes_advanced
),
and in the hooked function check for a
field in the post collection named
_wp_http_referer. It tells you where the upload request came from.If _wp_http_referer contains
“media-new.php”, you can return an
empty array (which will temporarily
stop thumbnail generation, but won’t
actually change any thumbnail
settings). Otherwise, return the
$sizes array untouched.
Try:
function wpsx_7756_no_thumbnails($arr_sizes){
if(stristr($_POST['_wp_http_referer'], 'media-new.php')) {
return array();
}
return $arr_sizes;
}
add_filter('intermediate_image_sizes_advanced','wpsx_7756_no_thumbnails');
Let me know if this works.
Keep in mind that adding the filter while you’re on the upload form won’t do what you want–the form posts to a separate page that handles the upload, and it won’t respect your filter.