Skip to content

Commit

Permalink
#975 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vasiliy-garenskikh committed Jun 14, 2019
1 parent 890fe9a commit 4f1c7b5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion connexion/apis/aiohttp_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from aiohttp import web
from aiohttp.web_exceptions import HTTPNotFound, HTTPPermanentRedirect
from aiohttp.web_middlewares import normalize_path_middleware
from aiohttp.web_request import FileField
from connexion.apis.abstract import AbstractAPI
from connexion.exceptions import ProblemException
from connexion.handlers import AuthErrorHandler
Expand Down Expand Up @@ -278,14 +279,17 @@ def get_request(cls, req):
if req.body_exists:
body = yield from req.read()

data = yield from req.post()
files = {k: v for k, v in data.items() if isinstance(v, FileField)}

return ConnexionRequest(url=url,
method=req.method.lower(),
path_params=dict(req.match_info),
query=query,
headers=headers,
body=body,
json_getter=lambda: cls.jsonifier.loads(body),
files={},
files=files,
context=req)

@classmethod
Expand Down

0 comments on commit 4f1c7b5

Please sign in to comment.