None check the correct variable

This commit is contained in:
Erik Johnston 2015-08-27 10:38:22 +01:00
parent f02532baad
commit 53c2eed862

View File

@ -150,8 +150,9 @@ class BaseMediaResource(Resource):
upload_name = None
else:
upload_name_utf8 = params.get("filename*", None)
if upload_name and upload_name_utf8.lower().startswith("utf-8''"):
upload_name = upload_name_utf8[7:]
if upload_name_utf8:
if upload_name_utf8.lower().startswith("utf-8''"):
upload_name = upload_name_utf8[7:]
if upload_name:
upload_name = urlparse.unquote(upload_name)
try: