From 3400b78db23fbd305cb11368946be1bf280e2696 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Fri, 5 Aug 2011 16:51:45 +0200 Subject: [PATCH] Only provide that monkeypatch if all files are missing --- flask/wrappers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask/wrappers.py b/flask/wrappers.py index 06f60beb..8ea4b840 100644 --- a/flask/wrappers.py +++ b/flask/wrappers.py @@ -107,7 +107,7 @@ class Request(RequestBase): # subclass that raises a different error for key errors. ctx = _request_ctx_stack.top if ctx is not None and ctx.app.debug and \ - self.mimetype != 'multipart/form-data': + self.mimetype != 'multipart/form-data' and not self.files: make_enctype_error_multidict(self)