[Zope] Uploading files

Jens Vagelpohl jens at dataflake.org
Sat Jun 4 05:49:53 EDT 2005


On 3 Jun 2005, at 18:09, Nikko Wolf wrote:
> In my python script I use:
>    filedata = container.REQUEST.file.read()
> then merge this data into a MIME submission for the external web  
> site, and on success, save it locally as a "file".
>
> My question is -- aside from memory usage, what problems might  
> there be with this approach?

It is *highly dangerous* to start requests to external resources from  
a running Zope request, unless you make sure the external request has  
a timeout that kicks in if it hangs for any reason. Just four hanging  
external resource requests and your Zope site is dead because all  
available threads are in use...

jens



More information about the Zope mailing list