[Zope] Help!

Roman V. Isaev rm@aroma.ru
Fri, 10 Aug 2001 13:16:41 +0400


Sorry if it's FAQ, but I can't find answer neither on google nor on zope.org.

How to check file existance?!

I want to upload file, but I don't know if it exists. So:

<dtml-call "PARENTS[0].manage_delObjects('filename')">
<dtml-call "PARENTS[0].manage_addFile('filename',file,title=REQUEST['title'])">

If I omit manage_delObjects, file will be uploaded once, then zope barks. If
I place manage_delObjects, the file HAVE to exist before I upload. Now how
to write this code in a such way that it would handle uploads in any case?

-- 
 Roman V. Isaev         http://www.aroma.ru         System Administrator