2008/6/2 Ian Bicking <[EMAIL PROTECTED]>:
>>> You need code that takes req.POST and turns it into the serialized body,
>>> so that the WSGI app you are calling can reconstruct that body.
>>
>> I understand that Pylons parses the body of the POST request and turns
>> into a Python data structure. In particular, any uploaded file gets
>> turned into a cgi.FieldStorage. What I need to do is convert it back
>> to its serialized version. Am I correct so far?
>>
>> Then where should I set the serialized version so that it can be used
>> by oher WSGI apps? It seems that request.POST can't be assigned a new
>> value.
>
> You'd put a new file-like object into wsgi.input, like:
>
> from cStringIO import StringIO
> environ['wsgi.input'] = StringIO(serialized_body)

Great, I managed to make it working. I'll try to get my head around
webob and add it there.
Thanks a lot.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to