You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by eps com estem <gg...@mixmail.com> on 2005/01/06 00:46:20 UTC

Re: libapreq2 upload question

I was just doing the validation of my new program version when I have tried the next
(simplified) code with firefox 0.92 which receives text and one image-upload through a
formulary written correctly.
With Firefox all has run perfectly, then i've tested on internet explorer 6.0 and oh
surprise (oh lovely explorer) there was no image in my web page, but text was all there.

The code:
------------------------
$info = {};
$info->{uploads} = [];
my $mm = Apache::Request->new($r,POST_MAX=>50000);
my $uploads = $mm->upload();
foreach (keys %$uploads)
 {
 $uploads->{$_}->slurp($info->{uploads}->[@{$info->{uploads}}]);
 }
------------------------

Monitoring with a warn keys %$uploads does a 0 keys for that hash, so i guess that
$mm->upload(); is not working.
I post this message because having the code running on firefox i suppose the code must be
well-written.

I've tried to code this:
------------------------
my $upload = $mm->upload("image"); # image is the name of the input
warn $upload;
------------------------
In Firefox i receive 6-8 entries, all empties minus one that present the correct value
Apache::Upload=SCALAR(0x154fb7c)
In Explorer all entries all empty.
So the problem is with explorer.

An extra thing, if i put the warn like this:
warn $upload->filename();

I recieve the server error <Can't call method "filename" on an undefined value>.
It is wrong, isn't it??


Thanks
apache 2.0.52(win32), mod_perl 1.99_18, perl 5.8.2, libapreq 2.04-dev.

---------------------------------------------------------
�Todav�a no conoces lo m�s original en cartas a los Reyes Magos? Ven a http://greetingmania.ya.com
Ya.com ADSL Router Wi-Fi: S�lo 29,90 �/mes + IVA*. Router + Antivirus y firewall �Gratis! http://acceso.ya.com/adsl/256router