diff options
author | Dirk Mallunat <s4msung@exigen.org> | 2016-07-08 20:42:56 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2016-07-08 20:47:31 +0200 |
commit | 100bb5729a98e3cebd65d7138fe08630205be762 (patch) | |
tree | 9f3f10e1061ece242760c18dae8606e282443d38 | |
parent | 74af7b06ba8ff2f1953816fe64fc9fa76148f3d5 (diff) |
fix error with non ascii chars in filename
-rwxr-xr-x | fb.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -99,7 +99,7 @@ class CURLWrapper: def __add_post(self, data): for item in data: for key, value in item.items(): - self.post.append((key, (pycurl.FORM_CONTENTS, value))) + self.post.append((key, (pycurl.FORM_CONTENTS, value.encode('utf-8')))) def getServerConfig(self): if self.serverConfig is None: @@ -151,7 +151,7 @@ class CURLWrapper: for file in chunk: counter+=1 self.post.append( - ("file["+str(counter)+"]", (pycurl.FORM_FILE, file.path)) + ("file["+str(counter)+"]", (pycurl.FORM_FILE, file.path.encode('utf-8'))) ) ret = self.send_post_progress("/file/upload", []) rets["ids"] += ret["ids"] |