#create a DTML Method called, uploadForm
#Way 1. The DTML Route
#create a DTML Method called processForm
Finished
#Way 2. The Python Route
#in Script (Python), called processForm
#parameters: id, file, title=''
REQUEST=context.REQUEST
content_type=file.headers['Content-Type']
if content_type.find('image')!=-1: #.find() is a method in Python2.0<
context.manage_addImage(id, file, title)
else:
context.manage_addFile(id, file, title)
return 'Finished'