diff options
author | Mark Haines <mark.haines@matrix.org> | 2014-12-04 14:22:31 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2014-12-04 14:22:31 +0000 |
commit | c01fd5573c92c7c6da258bac7ff377a91cbebfd1 (patch) | |
tree | 7562ac0c1e8b8ac8821c3255cbdbcc8d3fc15031 /synapse/media/v1/upload_resource.py | |
parent | Fix pyflakes and pep8 warnings (diff) | |
download | synapse-c01fd5573c92c7c6da258bac7ff377a91cbebfd1.tar.xz |
Implement download support for media_repository
Diffstat (limited to 'synapse/media/v1/upload_resource.py')
-rw-r--r-- | synapse/media/v1/upload_resource.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/synapse/media/v1/upload_resource.py b/synapse/media/v1/upload_resource.py index 2919fee12f..91bcc5caff 100644 --- a/synapse/media/v1/upload_resource.py +++ b/synapse/media/v1/upload_resource.py @@ -20,7 +20,8 @@ from synapse.api.errors import ( cs_exception, SynapseError, CodeMessageException ) -from twisted.web import server, resource +from twisted.web.resource import Resource +from twisted.web.server import NOT_DONE_YET from twisted.internet import defer import os @@ -30,9 +31,11 @@ import logging logger = logging.getLogger(__name__) -class UploadResource(resource.Resource): +class UploadResource(Resource): + isLeaf = True def __init__(self, hs, filepaths): + Resource.__init__(self) self.auth = hs.get_auth() self.clock = hs.get_clock() self.store = hs.get_datastore() @@ -41,11 +44,11 @@ class UploadResource(resource.Resource): def render_POST(self, request): self._async_render_POST(request) - return server.NOT_DONE_YET + return NOT_DONE_YET def render_OPTIONS(self, request): respond_with_json(request, 200, {}, send_cors=True) - return server.NOT_DONE_YET + return NOT_DONE_YET @defer.inlineCallbacks def _async_render_POST(self, request): |