Ticket #3211: allow_MHTML_upload_patch.r6660.diff
File allow_MHTML_upload_patch.r6660.diff, 1.3 KB (added by , 17 years ago) |
---|
-
__init__.py
112 112 # or {'name': 'blah'} for POST fields 113 113 # We assume all uploaded files have a 'filename' set. 114 114 if 'filename' in name_dict: 115 assert type([]) != type(submessage.get_payload()), "Nested MIME messages are not supported" 115 #assert type([]) != type(submessage.get_payload()), "Nested MIME messages are not supported" 116 _payload = submessage.get_payload() 117 if type([]) == type(submessage.get_payload()): 118 _payload = submessage.get_payload(0).as_string() 116 119 if not name_dict['filename'].strip(): 117 120 continue 118 121 # IE submits the full path, so trim everything but the basename. … … 123 126 FILES.appendlist(name_dict['name'], FileDict({ 124 127 'filename': filename, 125 128 'content-type': 'Content-Type' in submessage and submessage['Content-Type'] or None, 126 'content': submessage.get_payload(),129 'content': _payload, 127 130 })) 128 131 else: 129 132 POST.appendlist(name_dict['name'], submessage.get_payload())