Hi,
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Philippe Jadin Sent: Wednesday, October 17, 2001 1:18 PM To: Hans N. Beck Cc: zope@zope.org Subject: Re: [Zope] Zope newbee fighting with manage_addNewFile
"Hans N. Beck" wrote:
Hi,
I've build the Zoo Example form the Zope book, but instead
of guest list
I want to add documents (that means a document list instead of guest list) I done a
context.manage_addFile(id, title="test", file=path),
where "path" is given by a dtml form. But this only creates files containing one single string indentically to "path", nothing to see from the content of the file. What's going wrong ? Permissions are set correctly, I think.
Is your html form using a "file" type input box ?
yes, it is. Now I've tried a script from Zopelab which don't uses parameters but use REQUEST object. It seems, that there is a difference: in the REQUEST object there is somithing like a "file object". (REQUEST[key]=...)Give that to addFile as parameter works fine. My variant uses only the path as a simple string, giving it to the python script as parameter and so to addFile as parameter. In this case the created file only contains that string, the path. May be an explanation ? What exactly get I back from a form type="file" name="something" ? Greetings Hans
Philippe
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )