mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-03 20:10:10 +03:00
Fixed handle empty filename
This commit is contained in:
parent
b3b0515ae6
commit
0fb927d2f5
|
@ -271,7 +271,7 @@ class FileUploadParser(BaseParser):
|
|||
|
||||
for i, handler in enumerate(upload_handlers):
|
||||
file_obj = handler.file_complete(counters[i])
|
||||
if file_obj:
|
||||
if file_obj is not None:
|
||||
return DataAndFiles(None, {'file': file_obj})
|
||||
raise ParseError("FileUpload parse error - "
|
||||
"none of upload handlers can handle the stream")
|
||||
|
|
Loading…
Reference in New Issue
Block a user