perl-asp mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Chamas <>
Subject Re: File uploads
Date Mon, 05 Nov 2001 20:40:22 GMT
"John D. Leonard II" wrote:
> All:
> I'm struggling with a FileUpload problem.  My form works properly, but my
> $Request->{FileUpload} variable is not getting set.  I'm running Apache::ASP
> 2.27 on Apache 1.3.20 and modperl 2.25.  (I have gotten similar code to work
> on a different machine - so I'm thinking that I've got some configuration
> setting messed up.)

The $Request->{FileUpload} init gets triggered by these if blocks:

    if(($r->method() || '') eq 'POST') {	
	$self->{TotalBytes} = $ENV{CONTENT_LENGTH};
	if($ENV{CONTENT_TYPE}=~ m|^multipart/form-data|) {

so please be sure that your form looks like:

  <FORM METHOD="POST"  ENCTYPE="multipart/form-data">

If your code works on one machine but not another, make
sure your versions are the same.  I have often heard
how upgrading to the latest can break the file upload
( over the years, not necessarily the actual latest ).

> My $filehandle is set properly (see below.) $Request->{FileUpload} is not
> getting set.  Below is the debug trace from the code above.  Note the blank
> line after "doing my thing."

I should add some system level debugging during the file upload processing,
which would help during Debug -1 traces.

>   <INPUT TYPE="file" NAME="link_upload_file" VALUE="starting value" SIZE=30

For further help, I can email you a 2.29 with some extra debugging
in the file upload block, and maybe we can get a hint as to what's
going on.  Let me know if you need this.

-- Josh
Joshua Chamas                           Chamas Enterprises Inc.
NodeWorks Founder                       Huntington Beach, CA  USA                1-714-625-4051

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message