Hello everyone, I was hoping someone could give me a hand with file
uploads in mod perl.  Everytime I try to upload a file, the browser will
stall a couple of times, and the file ends up on the server as a zero
byte file.  I'm pretty sure this is a binmode problem,
and I've tried it a bunch of different ways, but nothing seems to work.
I've included the code for my upload form and my upload procedure.  If
anyone can shed any light on this problem I'd really appreciate it!!!
Thanks alot!!!!

##### Display upload form
$query = new CGI;
print $query->start_multipart_form;
print $query->filefield('uploaded_file','file',50,256);
print $query->submit('SubmitUpload','Upload');
print $query->endform;

################# Upload Procedure
my $buffer;
my $inputfile = param('uploaded_file');
open (OUTFILE,">$ENV{DOCUMENT_ROOT}/images/test.gif") ;
binmode OUTFILE;
binmode $inputfile;
while (read($inputfile,$buffer,1024))
    {
        print OUTFILE $buffer;
    } ## end while

Reply via email to