13 Feb
2000
13 Feb
'00
1:34 a.m.
My original question was how to check if the user omits the filename in a submitted form: <dtml-if newimage> <dtml-call "manage_addImage('id', newimage.read(), '')"> </dtml-if> One option was to use name="filename:string:ignore_empty" but this seems to confuse Zope's content-type recognition when a file is actually selected. Kevin Dangoor suggested:
How about this (untested, as usual :): <dtml-if "newimage.id()">
or maybe <dtml-if "newimage.filename">
The first does not work. The second does! Thanks very kindly. Darran.