mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-05 13:00:12 +03:00
parent
a8deb380ff
commit
03151ca4fd
|
@ -183,7 +183,7 @@ class FileUploadParser(BaseParser):
|
||||||
|
|
||||||
for index, handler in enumerate(upload_handlers):
|
for index, handler in enumerate(upload_handlers):
|
||||||
file_obj = handler.file_complete(counters[index])
|
file_obj = handler.file_complete(counters[index])
|
||||||
if file_obj:
|
if file_obj is not None:
|
||||||
return DataAndFiles({}, {'file': file_obj})
|
return DataAndFiles({}, {'file': file_obj})
|
||||||
raise ParseError("FileUpload parse error - "
|
raise ParseError("FileUpload parse error - "
|
||||||
"none of upload handlers can handle the stream")
|
"none of upload handlers can handle the stream")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user