[Twisted-web] file upload without formless

Andrea Arcangeli andrea at cpushare.com
Tue Feb 15 02:51:02 MST 2005

On Mon, Feb 14, 2005 at 11:25:19PM +0100, Tazzo wrote:
> I have some problem with formless and the use a did
> with locateChild method. I'm working to solve the problem
> using Configurable but it's hard because formbuilder.py
> is the only example I found ... is there any other example? 
> In the meantime someone could send me a simple example of a 
> file upload for big files (...no blocking code :) without formless?

File upload and no blocking code is impossible (with linux kernel)
unless you store the file in a separate process or unless you use kernel
async-io support.

So either you use a sql db with "binary" field, or you have to store the
file using a "pb" server, in a separate twisted process.

Some discussion happend on twisted-python and it seems somebody is
working on it. I even considered writing a generic storage daemon that
would avoid the twisted core to block on I/O, but then I giveup
completely and I use only postgresql under Valentino suggestion, and it
works great ;)

More information about the Twisted-web mailing list