You could try:
if (($key =~ /new_file_(\d+)/) && $ARGS{'new_file_'.$1}) {
use Apache2::Upload;
my $req = Apache2::Request->new($r);
my $upload = $req->upload("foo");
my $size = $upload->size;
# three methods to get at the upload's contents ... slurp, fh, io
$upload->slurp($slurp_data);
read $upload->fh, $fh_data, $size;
ok $slurp_data eq $fh_data;
On Sun, Dec 29, 2013 at 10:51 AM, Michael W. Zaskey, CTS <[email protected]> wrote:
> Hello,
>
> I have a site that was built on Mason several years ago. It has worked fine
> on the old server (Apache 1) and was recently migrated to a new server
> (Apache2) and we were able to make nearly all pages work perfectly except the
> original upload code for my images on the back end. Unfortunately the
> original programmer is no longer available, and I have limited knowledge
> (other then what I have learned during troubleshooting various issues and
> updating some features over the years).
>
> I am hoping someone may be able the give me a clue on this error or provide a
> snip of known working code for me to test with.
>
>
>
>
> error: Can't locate object method "upload" via package "Apache2::RequestRec"
> at /home/~path and file edited for post~.mpl line 60.
> context: ...
> 56: }
> 57: if (($key =~ /new_file_(\d+)/) && $ARGS{'new_file_'.$1}) {
> 58:
> 59:
> 60: my $upload = $r->upload('new_file_'.$1);
> 61:
> 62: #create a unique filename
> 63: $SQL = "SELECT nextval('file_name_seq')";
> 64: my $file_seq = $db->selectrow_array($SQL);
>
>
>
>
> Thank you,
>
> Michael
>
> ***New for Fall 2013: New England’s Premier Visual Display System! Our new
> Oracle LED Systems Black Widow HD9 large-format indoor/outdoor LED video
> displays feature 9mm resolution, 7000 nit brightness, and a wide variety of
> configurations for every application. Visit our
> website<http://www.zasco.com/av_led_displays.html> to learn more.
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Mason-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mason-users
--
Ryan Perry
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users