unicode
This commit is contained in:
parent
913b5b4c32
commit
7507b32383
1 changed files with 3 additions and 1 deletions
|
@ -313,7 +313,9 @@ class API(object):
|
||||||
for key in data:
|
for key in data:
|
||||||
form.add_field(str(key), data[key].encode('utf-8'))
|
form.add_field(str(key), data[key].encode('utf-8'))
|
||||||
for frame in i['frames']:
|
for frame in i['frames']:
|
||||||
form.add_file('frame', os.path.basename(frame), open(frame, 'rb'))
|
fname = os.path.basename(frame)
|
||||||
|
if isinstance(fname, unicode): fname = fname.encode('utf-8')
|
||||||
|
form.add_file('frame', fname, open(frame, 'rb'))
|
||||||
r = self._json_request(self.url, form)
|
r = self._json_request(self.url, form)
|
||||||
|
|
||||||
#upload video in chunks
|
#upload video in chunks
|
||||||
|
|
Loading…
Reference in a new issue