<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 25, 2012, at 5:28 AM, Gerrat wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Tristan Seligmann &lt;mithrandi &lt;at&gt; <a href="http://mithrandi.net">mithrandi.net</a>&gt; writes:<br><br><blockquote type="cite"><br></blockquote><blockquote type="cite">On Tue, Jun 30, 2009 at 10:44 AM, Reza Lotun&lt;rlotun &lt;at&gt; <a href="http://gmail.com">gmail.com</a>&gt; wrote:<br></blockquote><blockquote type="cite"><blockquote type="cite">To be safer, I do a request.content.getvalue() since content is a<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">cStringIO object and you can never be sure if somewhere along the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">chain of processing someone hasn't done a .read and forgot to do a<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">.seek(0,0).<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">You should probably do the seek/read instead, since I don't believe<br></blockquote><blockquote type="cite">this is guaranteed to be a cStringIO; it might be an actual file on<br></blockquote><blockquote type="cite">disk, or something else.<br></blockquote><br>Thank You!!!<br><br>Every &lt;stupid&gt; example I've seen used "request.content.getvalue()" ...which<br>fails miserably for me (possibly because I'm on 64bit windows - but cStringIO is<br>available, so I'm not sure why it's not used). &nbsp;request.content.read() works<br>wonderfully. &nbsp;The "getvalue" method looked familiar, but I couldn't recall where<br>I'd seen it - only that *my* request.content doesn't have a getvalue method. &nbsp;It<br>took quite a few searches before I stumbled on your comment here which gave me<br>the correct solution.<br></div></blockquote></div><br><div>Nothing to do with 64bit windows. &nbsp;twisted.web will switch to a file when the threshold of the upload goes above a certain size. &nbsp;request.content is a file-like object, not any particular implementation of that protocol.</div><div><br></div><div>This really <i>should</i>&nbsp;be documented in&nbsp;<a href="http://twistedmatrix.com/documents/current/api/twisted.web.iweb.IRequest.html">http://twistedmatrix.com/documents/current/api/twisted.web.iweb.IRequest.html</a> - it's a bug that it isn't.</div><div><br></div><div>-glyph</div></body></html>