Support unicode filenames in staging folders.

This commit is contained in:
Roberto Rosario
2016-03-20 15:40:42 -04:00
parent b32563ac8e
commit 6ec7a2ca4d
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -50,10 +50,10 @@ class StagingFile(object):
self.encoded_filename = str(encoded_filename)
self.filename = base64.urlsafe_b64decode(
urllib.unquote_plus(self.encoded_filename)
)
).decode('utf8')
else:
self.filename = filename
self.encoded_filename = base64.urlsafe_b64encode(filename)
self.encoded_filename = base64.urlsafe_b64encode(filename.encode('utf8'))
def __unicode__(self):
return unicode(self.filename)