Hello all,

I'm working on a site under Apache 2.0.47 with modperl 1.99.09. I've got most everything working right in my server setup, I can get and set cookies, get input variables from forms/etc., and all that jazz. I'm having a problem with form uploads however.

Here's a test script/form and the output:

FORM
----------------
<html>
<body>
<form action="test.cgi" enctype="multipart/form-data">
<input type="file" name="upload_file" />
<input type="submit" />
</form>
</body>
</html>
----------------

SCRIPT
----------------
#!/usr/bin/perl -w

use CGI::Simple;
use strict;

my $query = new CGI::Simple;
my $files = $query->upload();
my @files = $query->upload();
my $filename = $query->param('upload_file');
my $size = $query->upload_info($filename, 'size');
my $mime = $query->upload_info($filename, 'mime');

print "Content-Type: text/plain\n\n";
print "upload() as scalar: ", $files, "\n";
print "upload() as list: ", join(', ', @files), "\n";
print "param('upload_file'): ", $filename, "\n";
print "upload_info(..., 'size'): ", $size, "\n";
print "upload_info(..., 'mime'): ", $mime, "\n";

exit;
---------------

RESULTS
---------------
upload() as scalar:
upload() as list:
param('upload_file'): ancient_wisdom.jpg
upload_info(..., 'size'):
upload_info(..., 'mime'):
---------------

Is there a reason the uploaded file isn't coming through. I'd be more specific if I knew what the cause might be, but I'm just at a loss.

CGI::Simple v0.071
Perl 5.8.0

Thanks in advance,

Jacob Fugal



Reply via email to