[Zope] manage_addFile
Annie Private
annienmd@hotmail.com
Thu, 17 Apr 2003 13:05:05 -0400
Hi. I am trying to move a pdf file from a remote server onto a local Zope
server. I have an external method that gets it from the remote server into
/tmp and that part works fine. But I can't get it programmatically uploaded
into Zope from there.
It seems like every method I've tried to get a file object has given me a
pointer inside the file instead. That, or I end up with a new object whose
contents are only a string, such as the filename.
Here's one version I tried.
try:
fyl=urllib.open(fromurl)
folder.manage_addFile(filename, fyl, mime)
except:
return errormsg
Part of the problem is that the files will be large binary pdf files, so I
really want to avoid reading them out line by line.
I'm on Red Hat Linux 7.2, Zope 2.5.0, python 2.1.2
I'd really appreciate your help on this. Thanks,
Annie
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail