Fixed parse file name

This commit is contained in:
Vladislav Vlastovskiy 2014-04-14 12:21:38 +04:00
parent 93b9245b87
commit 4b3eb6e0b0

View File

@ -288,7 +288,7 @@ class FileUploadParser(BaseParser):
try: try:
meta = parser_context['request'].META meta = parser_context['request'].META
disposition = parse_header(meta['HTTP_CONTENT_DISPOSITION']) disposition = parse_header(meta['HTTP_CONTENT_DISPOSITION'].encode('utf-8'))
return disposition[1]['filename'] return disposition[1]['filename']
except (AttributeError, KeyError): except (AttributeError, KeyError):
pass pass