Where is the 'manage_upload' function documented?
The problem that I had with manage_addFile seems to because I passed it a
unicode object rather than a string. The error message was "*'unicode'
object has no attribute 'seek'*" which led me to think a file-like object
2008/9/2 Dieter Maurer <[EMAIL PROTECTED]>
> Jakob Schou Jensen wrote at 2008-9-2 09:25 +0200:
> >By file object I meant the "OFS.Image.File" kind. I had two problems
> >creating and modifying the file (at least). The first was that the
> >manage_addFile() function that you mention seemed to insist on a os-file
> >like object for the "file" parameter.
> It is ready to accept a string or a "file" like object
> (usually, it gets a "ZPublisher.HTTPRequest.FileUpload" instance).
> >Appart from that I got a security error when I called the
> This is internal. The corresponding "official" method
> is "manage_upload".
> > ...
> >Well ... it works ... there may be a simpler way as you suggest. If you
> >some sample code I would like to see it. I am using zope 2.4.something.
> In an interactive Python session (under *nix: "bin/zopectl debug"):
> >>> app.manage_addProduct['OFSP'].manage_addFile('test_file',
> >>> tf=app.test_file
> >>> str(tf)
> The example shows you, that a string is accepted as "file" value.
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -