Only provide that monkeypatch if all files are missing

This commit is contained in:
Armin Ronacher 2011-08-05 16:51:45 +02:00
parent 23c1dd8db2
commit 3400b78db2

View file

@ -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)