[Zope] testing

Kevin Howe khowe@performance-net.com
Tue, 5 Oct 1999 18:38:24 -0300


This is a multi-part message in MIME format.

------=_NextPart_000_0592_01BF0F60.CEE7D480
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi all,

How do you test if a file upload field has a value?=20
i.e. Did the user upload a new image or not? If so, do the =
manage_upload, if not, continue.

Something like the following:

<!--#if "REQUEST['image1']"-->
<!--call "image1.manage_upload(REQUEST['image1'])"-->
<!--#/if-->


Much appreciated,
Kevin

------=_NextPart_000_0592_01BF0F60.CEE7D480
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.2106.6"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>Hi all,</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>How do you test if a file upload =
field has a=20
value? </FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT><FONT color=3D#000000 =
size=3D2>i.e. Did the=20
user upload a new image or not? If so, do the manage_upload, if not,=20
continue.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Something like the following:</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 face=3D"" size=3D2>&lt;!--#if=20
&quot;REQUEST['image1']&quot;--&gt;<BR>&lt;!--call=20
&quot;image1.manage_upload(REQUEST['image1'])&quot;--&gt;<BR>&lt;!--#/if-=
-&gt;<BR></FONT></DIV>
<DIV><FONT color=3D#000000 face=3D"" size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Much appreciated,</FONT></DIV>
<DIV><FONT size=3D2>Kevin</FONT></DIV></BODY></HTML>

------=_NextPart_000_0592_01BF0F60.CEE7D480--