You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Frank Wiles <fr...@wiles.org> on 2000/03/30 04:56:21 UTC

File uploading?

 Hello Everyone, 

 I've been beating my head up against file uploading via the browser, in
 mod_perl.  The example in the Eagle book doesn't seem to be working for
 me. This is the latest error I'm getting: 

  [Wed Mar 29 20:36:07 2000] [error] Can't locate object method "new"
  via package "Apache::Request" at /usr/local/apache/mod_perl/Upload.pm
  line 6.

 I was wondering if someone could point me to a quick and dirty Upload
 module so I can figure out what is wrong. 

 P.S. Apache::Request is installed, but doesn't seem to contain a new 
 subroutine. 

 -------------------------------
  Frank Wiles <fr...@wiles.org>
  http://frank.wiles.org
 -------------------------------


Re: File uploading?

Posted by Peter Skipworth <sk...@realestate.com.au>.
I use CGI.pm...

<form... enctype=multipart/form-data>
<input type=file name=file1>
<input type=submit>
</form>
.
.
.
open (OUT, ">/tmp/upload.$$");
while (<$FORM{'file1'}>) {
    print OUT $_;
}
close OUT;
close $FORM{'file1'};

hope this helps,

regards,

P

.-----------------------------------------------------.
|       Peter Skipworth        Ph: 03 9897 1121       |
|      Senior Programmer      Mob: 0417 013 292       |
|      realestate.com.au   skip@realestate.com.au     |
`-----------------------------------------------------'


Re: File uploading?

Posted by Matt Sergeant <ma...@sergeant.org>.
On Wed, 29 Mar 2000, Frank Wiles wrote:

>  Hello Everyone, 
> 
>  I've been beating my head up against file uploading via the browser, in
>  mod_perl.  The example in the Eagle book doesn't seem to be working for
>  me. This is the latest error I'm getting: 
> 
>   [Wed Mar 29 20:36:07 2000] [error] Can't locate object method "new"
>   via package "Apache::Request" at /usr/local/apache/mod_perl/Upload.pm
>   line 6.
> 
>  I was wondering if someone could point me to a quick and dirty Upload
>  module so I can figure out what is wrong. 
> 
>  P.S. Apache::Request is installed, but doesn't seem to contain a new 
>  subroutine. 

It does have a new method, but you probably just missed out the:

use Apache::Request;

line.

-- 
<Matt/>

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org