[Twisted-web] Large file uploads
julian at whisper-net.de
Fri Jul 16 10:45:03 EDT 2010
I'm currently realizing a web server for my company which allows control of
some of our embedded devices. After some research, I decided on python and
twisted as the way to go using genshi as templating engine, which works very
The problem I encountered is as follows: The user of the web panel should also
be able to upgrade the firmware on our device. To make this possible, a file
upload has to take place. The firmware file can have a size of up to 150MB, so
it will not fit in the RAM of our device. It either won't fit on the NAND flash
chip twice, so it should be written to NAND with its final name and not as a
temporary file. To tell the server where to store the file upload, I could add a
hidden input to the upload form indicating the type of the file being uploaded,
so that the web server can save it to the right location.
Where's the place to hook in twisted to implement such a behaviour? Do I
really have to write a completely independent implementation of the HTTP
handler or could I also reuse some parts of twisted.web?
Does some code exist already which implements the wanted behaviour or could be
modified to implement it?
Thanks for your reply,
More information about the Twisted-web