multipart/form-data in an HTTP client

Nelson Minar nelson at
Wed Sep 1 16:52:33 CEST 2004

I'm writing some code to upload photos to Flickr. The Photo Upload API
requires documents be POSTed via a multipart/form-data request. I was
surprised to learn that Python 2.3's HTTP clients don't support this
form of POSTs. There is support in, for servers.

There are some implementations of multipart/form-data on ASPN:
urllib2_file seems to meet my needs, but I'm not wild about how it's
implemented. Is there some other recommended way to do
multipart/form-data uploads with HTTP in Python?


More information about the Python-list mailing list