httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Wichitill <ma...@gmx.de>
Subject Re: Problem use Apache::Upload
Date Fri, 30 Jul 2004 13:32:58 GMT
Keith C. Perry wrote:
> Quoting Markus Wichitill <mawic@gmx.de>:
>>If you want an Apache::Upload object, you need to pass a field name:
>>my $upload = $req->upload('foo');
>>
>> http://cvs.apache.org/~joes/libapreq2-2.04-dev/docs/html/group__apreq__xs__request.html#upload
> 
> I saw that but the way the docs read, its sounds like you don't need a parameter
> there.  

It says if you don't pass a name, you get an Apache::Upload::Table object in 
scalar context.

my $uploads = $req->upload();
my $upload = $uploads->{'foo'};

This is different from the apreq1 API, but passing the name works for both 
versions.

 > Also when you say field name... field name to what? Is this arbitary?

The name you gave the HTML form field.

<input type='file' name='foo'>

Mime
View raw message