Commit a5142328 by Michael Elovskikh

Raise ParseError if can't handle the uploaded file

parent e36e4f48
......@@ -269,6 +269,7 @@ class FileUploadParser(BaseParser):
file_obj = handler.file_complete(counters[i])
if file_obj:
return DataAndFiles(None, {'file': file_obj})
raise ParseError("FileUpload parse error - none of upload handlers can handle the stream")
def get_filename(self, stream, media_type, parser_context):
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment