httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+gm...@sunstarsys.com>
Subject Re: Problem use Apache::Upload
Date Fri, 30 Jul 2004 16:51:58 GMT
"Keith C. Perry" <netadmin@vcsn.com> writes:

[...]

> Well good news, the $req->parse in my case seem to be needed.  Here
> is what I was finally able to get going...
> 
> my $r=Apache->request;
> my $req = Apache::Request->new($r, TEMP_DIR => "/www/tmp");
> my $upload = $req->upload('sentfile');
> my $fname;
> 
> if ($upload) {
>  $req->parse;
>  $fname  = $upload->filename();
> }
> 
> $r->content_type('text/html');
> $r->send_http_header;
> 
> if ( $fname && $fname ne "" ) {
>  $r->print("Thank you for uploading <b>$fname</b><br>\n");
>  $upload->link("/www/tmp/$fname");
>  exit;
> }

It makes absolutely no sense to me that your above invocation
of $req->parse makes the slightest difference, because
the conditional guarantees that the $upload was already found!

So exactly what happens if you comment out your $req->parse call?

-- 
Joe Schaefer


Mime
View raw message