diff options
author | Erik Johnston <erik@matrix.org> | 2015-08-27 10:37:02 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-08-27 10:37:02 +0100 |
commit | f02532baadc4fbd95bec6cb7f45019d2c46c1324 (patch) | |
tree | 79da85dd3e5efa936f9c894298dea4454c0cf0c8 /synapse/rest/media | |
parent | Bump changelog and version (diff) | |
download | synapse-f02532baadc4fbd95bec6cb7f45019d2c46c1324.tar.xz |
Check for None
Diffstat (limited to 'synapse/rest/media')
-rw-r--r-- | synapse/rest/media/v1/base_resource.py | 2 |
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) |