[Zope] Adding new property to an image file

Mico Siahaan mico at intermatik.co.id
Mon Nov 17 16:15:47 EST 2003


Hi,

I am making a form that would permit user to upload image file into Zope
system. The user have to fill the information required such as: id, title,
file to upload and short story about that image.

So I make this DTMLs:

addImage_html:
<dtml-var standard_html_header>
<form method="post" action="addGalery" enctype="multipart/form-data">
<p>Id : <input type="text" name="id">
<p>Title: <input type="text" name="title">
<p>Description: <input type="text" name="description">
<p>File: <input type="file" name="file" value="">
<p><input type="submit" name="submit" value="Save Image">
</form>
<dtml-var standard_html_footer>

addGalery:
<dtml-var standard_html_header>
<dtml-var REQUEST>
<dtml-call "manage_addImage(REQUEST.id, REQUEST.file, REQUEST.title)">
<dtml-call "RESPONSE.redirect(URL1+'/toc')">
<dtml-var standard_html_footer>

---

The problem is I want to add a new property (description) to each image
created by addGalery DTML Method. I have put this in addGalery:

<dtml-call
"REQUEST.id.manage_addProperty('description',REQUEST.description,'string')">

But it failed. I know that manage_addProperty method is an object method
and REQUEST.id would not return the object I need. My question is: how to
correct the DTML statement above?

TIA


-- 
Mico Siahaan
-------------
mico at intermatik.co.id






More information about the Zope mailing list