Hi James, thanks for your answer.
On 2/6/06, James Y Knight
On Feb 6, 2006, at 5:52 AM, Henrik Thostrup Jensen wrote:
I'm trying to use web2 to stream uploading of data, but I ran into some problems. First I tried building from the example in http://twistedmatrix.com/projects/web2/documentation/examples/demo.html, however args and files objects in the request did not show anything. However the length of stream was correct, and using tcpdump, showed the correct value. So I tried building my own uploader which look like this:
What are you actually trying to do? There's two different kinds of "streaming upload". The simpler is just a raw data stream. If you just want raw data, forget POST and associated form processing, and just use request.stream.read() in with a PUT method. That will work with curl -T.
This is what i want - raw data as I'm uploading files. I hacked up a small example and got it to work. I also tried POST for the fun of it, and that seems to work as well. Not sure what I got wrong before. Oh, and deferredGenerator is darned clever :-). I can help explain any of the alternatives in more detail if you let me know
which you're really interested in.
I think I got whats needed for now. Thanks for your time. -- - Henrik