[Zope] Checking files to upload

Juan Manuel Ruiz Garcia juanm_ruiz@yahoo.es
Sat, 5 Oct 2002 16:22:52 +0200


Hi,

I want to check selected files for upload before.  My script is this one:

-------------------
id=context.REQUEST.form['id']
descr=context.REQUEST.form['desc']
fileToUpload=context.REQUEST.form['file']
context.manage_addFile(id,fileToUpload,descr)
-------------------

The point is that, if I enter a non-existing file in the "file" input field
in the form that calls this script, this code creates a zero-bytes files,
instead of warning me... how can I change this code to detect "file not
found error"?

Working with Zope 2.3 (Python 1.5)

Thanks,



_______________________________________________________________
Copa del Mundo de la FIFA 2002
El único lugar de Internet con vídeos de los 64 partidos. 
¡Apúntante ya! en http://fifaworldcup.yahoo.com/fc/es/