[Zope] manage_addFile

Dieter Maurer dieter@handshake.de
Fri, 18 Apr 2003 22:52:50 +0200


Annie Private wrote at 2003-4-17 13: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

What happened (precisely) with this code?

It looks good and should work.


Dieter