Unfortunately, multipart's File class seems to have a serious regression compared to cgi's FieldStorage class: Where FieldStorage.type contained the declared MIME type of the uploaded file (or None if not given), File does not seem to have this information. This makes is basically impossible to download uploaded files while keeping the file type intact.
Unfortunately, multipart's
Fileclass seems to have a serious regression compared to cgi'sFieldStorageclass: WhereFieldStorage.typecontained the declared MIME type of the uploaded file (orNoneif not given),Filedoes not seem to have this information. This makes is basically impossible to download uploaded files while keeping the file type intact.