fix document upload
This commit is contained in:
parent
bb4a5b1216
commit
d28dda73ae
1 changed files with 2 additions and 1 deletions
|
@ -1109,6 +1109,7 @@ class API(ox.API):
|
||||||
|
|
||||||
def upload_chunks(self, url, filename, data=None):
|
def upload_chunks(self, url, filename, data=None):
|
||||||
resume = None
|
resume = None
|
||||||
|
init_data = data
|
||||||
if self._resume_file and os.path.exists(self._resume_file):
|
if self._resume_file and os.path.exists(self._resume_file):
|
||||||
with open(self._resume_file) as f:
|
with open(self._resume_file) as f:
|
||||||
try:
|
try:
|
||||||
|
@ -1123,7 +1124,7 @@ class API(ox.API):
|
||||||
data = None
|
data = None
|
||||||
while not data:
|
while not data:
|
||||||
try:
|
try:
|
||||||
data = self._json_request(url, data)
|
data = self._json_request(url, init_data)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("\ninterrupted by user.")
|
print("\ninterrupted by user.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
Loading…
Reference in a new issue