At Friday 18/8/2006 03:06, Bruno Dilly wrote:
I'm implementing a http client to POST using multipart/form-data. It
uses urllib2 module, and files are uploaded correctly.
But I need to know how much has been uploaded at a given moment, to
inform the user the proportion of the file already uploaded.
See httplib.HTTPConnection._send_request; after sending the headers:
if body:
self.send(body)
You should inherit from HTTPConnection and provide your feedback
there - that depends on your application.
Then, inherit from urllib2.HTTPHandler, and override http_open to use
your custom HTTPConnection.
Pass your custom HTTPHandler to build_opener and it will use it.
Gabriel Genellina
Softlab SRL
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas
--
http://mail.python.org/mailman/listinfo/python-list