diff options
| author | Michael Elovskikh | 2013-05-04 17:18:10 +0600 | 
|---|---|---|
| committer | Michael Elovskikh | 2013-05-04 17:18:41 +0600 | 
| commit | a514232815a82ad8a4dc1819afa0d62f9bab1323 (patch) | |
| tree | 881ff88fab1642deffb7788c1c737bb19bcfa645 /rest_framework/parsers.py | |
| parent | e36e4f48ad481b4303e68ed524677add07b224f7 (diff) | |
| download | django-rest-framework-a514232815a82ad8a4dc1819afa0d62f9bab1323.tar.bz2 | |
Raise ParseError if can't handle the uploaded file
Diffstat (limited to 'rest_framework/parsers.py')
| -rw-r--r-- | rest_framework/parsers.py | 1 | 
1 files changed, 1 insertions, 0 deletions
| diff --git a/rest_framework/parsers.py b/rest_framework/parsers.py index 7eb92184..27a0db65 100644 --- a/rest_framework/parsers.py +++ b/rest_framework/parsers.py @@ -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):          """ | 
