[Zope] upload file from filename
John Hunter
jdhunter@ace.bsd.uchicago.edu
Thu, 28 Feb 2002 12:18:58 -0600
>From a Python Script, given a string which is a filename on the local
filesystem, say,
thisFile = 'C:\\ProgramFiles\\SomeDir\\somefile.dat'
How can I upload this to the zope filesystem?
I naively tried:
folder.manage_addFile(id='somefile.dat', file=thisFile )
But of course this created a file somefile.dat with contents
'somefile.dat' because the 'file' argument contains the content, not
the name, of the file.
Any suggestions?
Thanks,
John Hunter