mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-29 13:04:03 +03:00
Merge pull request #2399 from askholme/master
Fix for FileUploadParser with 3.x
This commit is contained in:
commit
fb0a434f9b
|
@ -277,7 +277,7 @@ class FileUploadParser(BaseParser):
|
|||
for index, handler in enumerate(upload_handlers):
|
||||
file_obj = handler.file_complete(counters[index])
|
||||
if file_obj:
|
||||
return DataAndFiles(None, {'file': file_obj})
|
||||
return DataAndFiles({}, {'file': file_obj})
|
||||
raise ParseError("FileUpload parse error - "
|
||||
"none of upload handlers can handle the stream")
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user