diff options
author | Erik Johnston <erik@matrix.org> | 2015-02-10 17:34:51 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-02-10 17:34:51 +0000 |
commit | eae0842bc17b8af75bcb599866a5df8670fac754 (patch) | |
tree | a79e00280a48b6d56eae9c9ce6dee4448b4a119c /synapse/rest/media/v1 | |
parent | Merge branch 'develop' of github.com:matrix-org/synapse into state-chache (diff) | |
parent | Log all the exits from _attempt_new_transaction (diff) | |
download | synapse-eae0842bc17b8af75bcb599866a5df8670fac754.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into state-chache
Diffstat (limited to 'synapse/rest/media/v1')
-rw-r--r-- | synapse/rest/media/v1/upload_resource.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/rest/media/v1/upload_resource.py b/synapse/rest/media/v1/upload_resource.py index 5b42782331..6df52ca434 100644 --- a/synapse/rest/media/v1/upload_resource.py +++ b/synapse/rest/media/v1/upload_resource.py @@ -38,9 +38,10 @@ class UploadResource(BaseMediaResource): def render_OPTIONS(self, request): respond_with_json(request, 200, {}, send_cors=True) return NOT_DONE_YET - + @defer.inlineCallbacks - def create_content(self, media_type, upload_name, content, content_length, auth_user): + def create_content(self, media_type, upload_name, content, content_length, + auth_user): media_id = random_string(24) fname = self.filepaths.local_media_filepath(media_id) @@ -65,7 +66,7 @@ class UploadResource(BaseMediaResource): } yield self._generate_local_thumbnails(media_id, media_info) - + defer.returnValue("mxc://%s/%s" % (self.server_name, media_id)) @defer.inlineCallbacks |