Return-Path: Delivered-To: apmail-perl-embperl-archive@perl.apache.org Received: (qmail 42689 invoked by uid 500); 10 Jan 2003 14:53:19 -0000 Mailing-List: contact embperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list embperl@perl.apache.org Received: (qmail 42675 invoked from network); 10 Jan 2003 14:53:19 -0000 Message-Id: <5.2.0.9.0.20030110234253.00ce5270@pop.registeredsite.com> X-Sender: keith.watanabe@g3s.com@pop.registeredsite.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Fri, 10 Jan 2003 23:53:15 +0900 To: "Luiz Fernando B. Ribeiro" From: Keith Watanabe Subject: Re: question on multipart forms and %fdat Cc: embperl@perl.apache.org In-Reply-To: <20030110105117.316c64ba.luiz@engenhosolucoes.com.br> References: <5.2.0.9.0.20030109235441.00cf3d08@pop.registeredsite.com> <5.2.0.9.0.20030109162600.00cf3f78@pop.registeredsite.com> <5.2.0.9.0.20030109162600.00cf3f78@pop.registeredsite.com> <5.2.0.9.0.20030109235441.00cf3d08@pop.registeredsite.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N >Embperls handles file uploads trough CGI.pm this way when you use >"multipart" forms the file fields are converted in file handles. > >In the code bellow it seems that your are reading from the wrong >variable in your object: actually the thing is that the way my controller handles things, it doesn't= =20 even make the upload call (because it relies on hidden fields that tells=20 other objects what to instantiate). The main problem i'm seeing is that=20 %fdat only returns " name" and " filename" keys back. If I have more than= =20 one form field say hidden fields and text fields, those aren't=20 returned. Here's an example form i wrote up: test
    fdat: [+ %fdat +]
    [$ foreach $item keys %fdat $]
  • item: "[+ $item +]" is "[+ $fdat{$item} +]"
    [$ endforeach $]
When I attempt to iterate through %fdat, here's the type of output i= receive: fdat: 2/8 item: " name" is ""image"" item: " filename" is ""02071908max_NK116718_b.jpg" Content-Type: image/jpeg= =20 =FF=D8=FF=E0" (where 02071908max_NK116718_b.jpg is the file upload I'm trying to deal=20 with). What I want to know is what happens to my other form info like=20 junk1, junk2, and junk3? When I remove the method=3D"post" part, all of the= =20 fields are displayed correctly. the expected output should've at least=20 included the hidden and text fields in addition to the file. i'm not=20 really sure what to make of this. thanks! -keith=20 --------------------------------------------------------------------- To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org For additional commands, e-mail: embperl-help@perl.apache.org