[Zope] Uploading contents of a file

Marie Robichon robichon@esrf.fr
Tue, 14 May 2002 09:43:30 +0200


Hi,

I have written a method to create a folder with a page template 
inside.  What I would like to do is provide the user with a form similar to 
the edit form with an upload file field in order to place the contents into 
the page template.

I haven' t figured out how to recover the contents of the uploaded 
file.  How do I access manage_upload, and how do I inject the contents into 
my page template?

My method is :

<dtml-call "manage_addFolder(folderid, foldertitle)">
<dtml-with "_[folderid]">

<dtml-call 
"manage_addProduct['PageTemplates'].manage_addPageTemplate('index_html', 
foldertitle, file)">

</dtml-with>

In the API it talks about ZPythonScriptHTML_upload, but I don' t have a 
clue how to use it, am a (struggling) newbie....

Thanks for any clues or pointers as to where to find the answers,

Marie Robichon

Web Task Force
European Synchrotron Radiation Facility
BP 220
38043 Grenoble Cedex
France

http://www.esrf.fr

Tel: (33) 04 76 88 21 86
Fax: (33) 04 76 88 24 27