michellem has asked for the wisdom of the Perl Monks concerning the following question:
I have a strange problem with the following code:
In netscape and mozilla, this code works just fine - the file uploads happily. In IE 5 and 5.5 it barfs, with the following error:my $file= param(UPLOAD_FILE); if (!$file) { graceful_exit("No File!");} my $file_name; my @fname; if ($file =~ m/^[A-Z]+:/) { # its a full filename (@fname) = split(/\\/,$file); $file_name = $fname[$#fname]; } print "Filename:$file, $file_name, $#fname\n"; if ($#fname < 0) {$file_name = $file;} my $content_type = uploadInfo($file_name)->{'Content-Type'}; my $file_handle = upload(UPLOAD_FILE); open FILE, "<".FILESHARE_DIR or graceful_exit("Can't read director +y file"); chomp(my $directory = <FILE>); sysopen (OUTFILE, "$directory/$file", O_WRONLY | O_CREAT) or grace +ful_exit("Can't create file!");
"Can't use an undefined value as a HASH reference at ... line ..." which points to this line: my $content_type = uploadInfo($file_name)->{'Content-Type'};
Ideas? Suggestions?Thanks!
.Michelle
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: IE vs Netscape problems with Uploading
by ajt (Prior) on Dec 21, 2001 at 03:15 UTC | |
|
Re: IE vs Netscape problems with Uploading
by tradez (Pilgrim) on Dec 21, 2001 at 03:01 UTC | |
|
Re: IE vs Netscape problems with Uploading
by cfreak (Chaplain) on Dec 21, 2001 at 20:28 UTC |