Upload files with wsgi

Richard Thomas chardster at gmail.com
Wed Sep 29 03:55:32 EDT 2010


On Sep 28, 11:31 pm, Hidura <hid... at gmail.com> wrote:
> Hello, i have a project on Python3k, and i have a very big problem i
> don' t find how take an upload file i am using the wsgiref lib, and or
> theres any way to connect to the client in order to get the file by
> myself?
>
> Thank you
> Diego Hidalgo.
>
> --
> Enviado desde mi dispositivo móvil
>
> Diego I. Hidalgo D.

'wsgiref' doesn't do that part of request handling. You want to use
the 'cgi' module to parse the POST data: http://docs.python.org/library/cgi.html

Remember to set the enctype on your <form> tags to multipart/form-
data.

Chard.



More information about the Python-list mailing list