diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-03-12 11:37:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-12 11:37:57 -0500 |
commit | 55da8df0782f80c43d127cd563cfbb89106319db (patch) | |
tree | 655b690a5e7bf6d564bd47d3bd0c8924d7360851 /synapse/rest/media/v1/upload_resource.py | |
parent | Reject concurrent transactions (#9597) (diff) | |
download | synapse-55da8df0782f80c43d127cd563cfbb89106319db.tar.xz |
Fix additional type hints from Twisted 21.2.0. (#9591)
Diffstat (limited to 'synapse/rest/media/v1/upload_resource.py')
-rw-r--r-- | synapse/rest/media/v1/upload_resource.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/rest/media/v1/upload_resource.py b/synapse/rest/media/v1/upload_resource.py index 5e104fac40..ae5aef2f7f 100644 --- a/synapse/rest/media/v1/upload_resource.py +++ b/synapse/rest/media/v1/upload_resource.py @@ -22,6 +22,7 @@ from twisted.web.server import Request from synapse.api.errors import Codes, SynapseError from synapse.http.server import DirectServeJsonResource, respond_with_json from synapse.http.servlet import parse_string +from synapse.http.site import SynapseRequest from synapse.rest.media.v1.media_storage import SpamMediaException if TYPE_CHECKING: @@ -49,7 +50,7 @@ class UploadResource(DirectServeJsonResource): async def _async_render_OPTIONS(self, request: Request) -> None: respond_with_json(request, 200, {}, send_cors=True) - async def _async_render_POST(self, request: Request) -> None: + async def _async_render_POST(self, request: SynapseRequest) -> None: requester = await self.auth.get_user_by_req(request) # TODO: The checks here are a bit late. The content will have # already been uploaded to a tmp file at this point |