mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-27 20:22:07 +03:00
Consistency
This commit is contained in:
parent
66ec6cf9b8
commit
ddf4d2bd98
1 changed files with 3 additions and 3 deletions
|
@ -155,9 +155,9 @@ class BaseMediaResource(Resource):
|
|||
|
||||
# If there isn't check for an ascii name.
|
||||
if not upload_name:
|
||||
upload_name = params.get("filename", None)
|
||||
if upload_name and not is_ascii(upload_name):
|
||||
upload_name = None
|
||||
upload_name_ascii = params.get("filename", None)
|
||||
if upload_name_ascii and is_ascii(upload_name_ascii):
|
||||
upload_name = upload_name_ascii
|
||||
|
||||
if upload_name:
|
||||
upload_name = urlparse.unquote(upload_name)
|
||||
|
|
Loading…
Reference in a new issue