joet3ch has asked for the wisdom of the Perl Monks concerning the following question:

Greetings Monks .. Firefox 2.0 uploads work perfectly (or so it seems). IE 6.0 uploads the same file, but it ends up on the server as 0 bytes. CGI.pm version 3.25. Here's the snippet of code handling the upload, any ideas Monks?
my $formquery = CGI->new; my $formbulk = $formquery->param('bulk'); my $uploaddir = "/tmp/"; $formbulk =~ s/.*[\/\\](.*)/$1/; my $upload_filehandle = $formquery->upload("bulk"); open UPLOADFILE, ">$uploaddir/$formbulk"; binmode UPLOADFILE; while ( <$formbulk> ) { print UPLOADFILE; } close UPLOADFILE;

Replies are listed 'Best First'.
Re: IE file upload issue
by arcnon (Monk) on Oct 01, 2007 at 22:02 UTC
    while ( <$formbulk> ) {
    to
    while ( <$upload_filehandle> ) {
      ack! thanks :)