[Zope] LocalFS - large files / broken connections

Dieter Maurer dieter at handshake.de
Sun Aug 17 20:37:15 EDT 2003


David Siedband wrote at 2003-8-15 20:28 -0700:
 > Is the file cached by Zope and then written to the filesystem all at 
 > once or is it written to the filesystem in incrementally?  From the 
 > product code below, it looks like it it writing directly to the path 
 > location...

But, writing is not atomically (even if it seems to be).

 > What happens if someone is uploading a file and their net connection is 
 > broken?

The net connection is not a problem.
ZServer has stored the file in its entirety to a temporary file
(on your server) before Zope even sees the request.

But you can get other problems during the store (e.g. file system is full).

 > How would this be handled?  Could this result in a partial 
 > file being cached somewhere that needs to be purged or perhaps a write 
 > process that needs to be killed off?

You have to look at the LocalFS sources to answer these questions.
If it does nothing special (i.e. "try: ... except: ...) and
clean up in case of an exception, then you can get a partial file.


Dieter



More information about the Zope mailing list