mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-23 15:54:16 +03:00
Fixed parse file name
This commit is contained in:
parent
93b9245b87
commit
4b3eb6e0b0
|
@ -288,7 +288,7 @@ class FileUploadParser(BaseParser):
|
|||
|
||||
try:
|
||||
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']
|
||||
except (AttributeError, KeyError):
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue
Block a user