[Zope] Upload to a subfolder using an External Method

Adam Warner lists@consulting.net.nz
05 Nov 2001 22:25:13 +1300


Hi all,

This is the relevant part of my Python External Method that uploads an
HTML file called output.xhtml to the current folder (and is given the
name id).

	newfile=open('output.xhtml','r')
	newfile.seek(0)
	self.manage_addFile(id,newfile,content_type='text/html')
	newfile.close()

I would instead like to upload to a pre-existing subfolder called
'cached' (although creating a folder would be no big deal:
self.manage_addFolder(...)). I haven't found an applicable command in
the Zope Quick Reference to change the current Zope directory:

http://www.zope.org/Members/ZQR
http://www.zope.org/Members/ZQR/zqr/printable

I imagine the command would look something like
self.manage_changeFolder('cached')

I know it sounds easy but I'm stumped. Perhaps this has to be done in a
Python Script after the file has been uploaded to the Zope database?

Many thanks,
Adam

PS: I'm really happy because Debian Unstable now contains the latest
versions of Zope and Python. Thanks Gregor Hoffleit :-)