--- CMS.pm 2008-05-09 09:24:27.000000000 +0900 +++ CMS.pm.mod 2008-06-02 01:08:12.000000000 +0900 @@ -14,6 +14,9 @@ use MT::App; @MT::App::CMS::ISA = qw( MT::App ); +use constant MP2 => (exists $ENV{MOD_PERL_API_VERSION} and + $ENV{MOD_PERL_API_VERSION} >= 1.99 ); + sub init { my $app = shift; $app->SUPER::init(@_) or return; @@ -2655,8 +2658,13 @@ my($fh, $no_upload); if ($ENV{MOD_PERL}) { my $up = $q->upload('file'); - $no_upload = !$up || !$up->size; - $fh = $up->fh if $up; + if(MP2){ + $no_upload = !$up || !$up->upload_size; + $fh = $up->upload_fh if $up; + }else{ + $no_upload = !$up || !$up->size; + $fh = $up->fh if $up; + } } else { ## Older versions of CGI.pm didn't have an 'upload' method. eval { $fh = $q->upload('file') };