def application(environ, response):
    s = str(environ['wsgi.input'].read())
    b = compile('boundary=(.*)').search(environ['CONTENT_TYPE']).group
(1)
    p = compile(r'.*Content-Type: application/octet-stream\\r\\n\\r\\n
(.*)\\r\\n--'+b+'.*'+b+'--', DOTALL).match(s).group(1)
    #still need to convert p back to bin
    db.execute('UPDATE users SET picture=? WHERE uid=?',
(p,session.UID))

How the hell do people upload files in python 3 ?
I asked the python list and beside the eval(p) that does not work no
solution yet ?




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"modwsgi" 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/modwsgi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to