223 self.assocs = {} |
223 self.assocs = {} |
224 else: |
224 else: |
225 self.assocs = dict(assocs) # So we can change values |
225 self.assocs = dict(assocs) # So we can change values |
226 if 'filename*' in self.assocs: |
226 if 'filename*' in self.assocs: |
227 param = self.assocs['filename*'] |
227 param = self.assocs['filename*'] |
228 assert isinstance(param, ExtDispositionParm) |
228 if isinstance(param, ExtDispositionParm): |
229 self.assocs['filename*'] = ( |
229 self.assocs['filename*'] = ( |
230 parse_ext_value(param.value).string |
230 parse_ext_value(param.value).string |
231 ) |
231 ) |
232 |
232 |
233 def filename(self): |
233 def filename(self): |
234 """ |
234 """ |
235 The filename from the Content-Disposition header or None. |
235 The filename from the Content-Disposition header or None. |
236 |
236 |