Forgive me if this is not appropriate for this list,
but I'm not sure where else to turn. I am having
difficulty doing something very simple. For some
reason I can't get file uploads to work. I am doing
nothing fancy, but my uploads just don't work.
here's the stolen code snippet: (It might look
familiar to readers of 'CGI programming with perl')
my $file = $q->param ("file") || error ($q, "No
file received.");
my $filename = $q->param ("filename") || error ($q,
"No filename entered.");
my $fh = $q->upload($file);
my $buffer = "";
while (read ($fh, $buffer, $BUFFER_SIZE)) {
print OUTPUT $buffer;
}
close OUTPUT;
When I try to read from $fh, I get nothing. Also, I
tried to see where/what was going on with the temp
file that CGI.pm creates, but
my $tmpfile = $q->tmpFileName($file);
returns nothing.
and so does
my $info = $q->uploadInfo($assetParamName);
my $ctype = $info->{'Content-Type'};
Has anyone seen this type of behavior before? Is
there anything obvious that I should/shouldn't be
doing?
I should note that for some (probably unrelated
reason) use constant doesn't work either.
My environment:
OSX 10.1.4
APACHE Apache/1.3.20 (Darwin)
mod_perl 1.26
CGI.pm 2.752
Any ideas or suggestions would be greatly appreciated.
Thank you for your patience and help.
-chris
"I am a bear of little brain."
-pooh
__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com