[Zope] How to get raw upload data from POST?

Brad Clements bkc@murkworks.com
Thu, 24 May 2001 12:58:52 -0400


On 24 May 2001, at 12:34, marc lindahl wrote:

> Dig around in OFS/Image.py, you can see how they do it there.

Nope, that doesn't apply.

File in Image.py is passed a file object from FieldStorage which has already parsed the 
POST headers and decoded the mime body.

In my case, there isn't a mime body.

I have found that this works:

def GetRequestBody(REQUEST):
   "get stdin data"
   s = REQUEST.stdin
   s.seek(0)
   return s.read()