From the documentation of Apache2::Request:
upload$req->upload() $req->upload($name)With no arguments, this method returns an APR::Request::Param::Table object in scalar context, or the names of all Apache2::Upload objects in list context.
So, your $upload loop variable contains just a string (the name of an Apache2::Upload object). The string is no object proper, so you can't $upload->fh. Not having used myself anything mod_perl or Apache2::whatever - perhaps the following works:
foreach my $upload ($r->upload()) { my $upload_fh = $r->upload($upload)->fh; my $contents; while(<$upload_fh>) { $contents .= $_; } close($upload_fh); # write $contents to the file here... }
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
In reply to Re: libapreq2 upload problem
by shmem
in thread libapreq2 upload problem
by zdzieblo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |