Function
cgi.parse_multipart

Signature

parse_multipart(fp, pdict)

Documentation String

Parse multipart input.

Arguments: fp : input file pdict: dictionary containing other parameters of conten-type header

Returns a dictionary just like parse_qs(): keys are the field names, each value is a list of values for that field. This is easy to use but not much good if you are expecting megabytes to be uploaded -- in that case, use the FieldStorage class instead which is much more flexible. Note that content-type is the raw, unparsed contents of the content-type header.

XXX This does not parse nested multipart parts
use FieldStorage for that.
XXX This should really be subsumed by FieldStorage altogether
no point in having two implementations of the same parsing algorithm.