[Zope] Get Propertie-Content from a File

sbergmann@weblog.de sbergmann@weblog.de
Mon, 05 Nov 2001 12:15:23 -0000


I want to create a DTMLDocument which has the Content from a File on 
the local filesystem. That=B4s the same what Zope can do in the manage-
mode but in my case it doesn=B4t match.
I have createth following form:

<form action=3D"homepage_menue_links_addForm2"><table> 
<tr><th>Id</th> 
    <td><input type=3Dtext name=3Dtemp_id></td> 
</tr> 
<tr><th>Titel</th> 
    <td><input type=3Dtext name=3Dtemp_title></td> 
</tr> 
<tr><td></td>
<tr><th>Beschreibung</th> 
    <td><textarea name=3Dtemp_beschreibung rows=3D"10" 
cols=3D"50"></textarea></td> 
</tr> 

<td><input type=3Dsubmit value=3D" Add "></td></tr> 
</table></form> 

Then the following Form is called:

<FORM ACTION=3D"homepage_menue_links_add" METHOD=3D"GET"
      ENCTYPE=3D"multipart/form-data">
.....
<INPUT TYPE=3D"file" NAME=3D"temp_file:string" SIZE=3D"25" VALUE=3D"">
...


The following method should add a DTMLDocument with the content of 
the file:

<dtml-let new=3D"homepage_menue_links.createInObjectManager(REQUEST
['temp_id'],REQUEST)">
<dtml-call expr=3D"new.manage_addDTMLDocument
(temp_id,temp_title,temp_file)">
...
</dtml-let>

But Zope adds a DTMLDocument with the path of the file, 
like 'C:\folder\file.html'
Does anybody know what is wrong?

Steffen

Steffen