summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-08-27 10:37:02 +0100
committerErik Johnston <erik@matrix.org>2015-08-27 10:37:02 +0100
commitf02532baadc4fbd95bec6cb7f45019d2c46c1324 (patch)
tree79da85dd3e5efa936f9c894298dea4454c0cf0c8 /synapse
parentBump changelog and version (diff)
downloadsynapse-f02532baadc4fbd95bec6cb7f45019d2c46c1324.tar.xz
Check for None
Diffstat (limited to 'synapse')
-rw-r--r--synapse/rest/media/v1/base_resource.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/rest/media/v1/base_resource.py b/synapse/rest/media/v1/base_resource.py
index 60751da1d1..b0e997b478 100644
--- a/synapse/rest/media/v1/base_resource.py
+++ b/synapse/rest/media/v1/base_resource.py
@@ -150,7 +150,7 @@ class BaseMediaResource(Resource):
                     upload_name = None
                 else:
                     upload_name_utf8 = params.get("filename*", None)
-                    if upload_name_utf8.lower().startswith("utf-8''"):
+                    if upload_name and upload_name_utf8.lower().startswith("utf-8''"):
                         upload_name = upload_name_utf8[7:]
                 if upload_name:
                     upload_name = urlparse.unquote(upload_name)