[Israel.pm] file upload succeed on FF and failed on IE
Sagiv Barhoom
sagivba at 012.net.il
Mon Jul 23 14:18:22 PDT 2007
hi all I am trying to write page which upload files to the server .
of FF it works fine .
but on IE I just cn not get the file hanle from CGI::upload.
the form tag is :
<form action="cgi-bin/upload" method="post" enctype="multipart/form-data">...
<input onclick="document.file_form.file1.focus();"
name="file1" type="file" /><br />
the error log file complain on: "'file1' : Inappropriate ioctl for device -"
and here part of the script:
###----------------------------------------------------------
my $upload_filehandle = $q->upload($k)
||$logger->warn(__LINE__,"could not create file handle of '$k': $! - ".
$q->cgi_error);
$logger->debug(__LINE__, "upload_files: upload info:".Dumper
$q->uploadInfo($upload_filehandle));
open UPLOADFILE, ">$UPLOAD_DIR/$filename_to_write" or
$logger->warn(__LINE__, "upload_files: failed to open $filename : $!");;
binmode UPLOADFILE;
$logger->debug(__LINE__, "upload_files: open binmode
$UPLOAD_DIR/$filename_to_write");
while ( <$upload_filehandle> ){
print UPLOADFILE;
}
close UPLOADFILE or
$logger->warn(__LINE__, "upload_files: failed to close $filename_to_write :
$!");
###----------------------------------------------------------
Regards Sagiv
More information about the Perl
mailing list