fix document upload

This commit is contained in:
j 2024-03-31 10:58:11 +02:00
parent bb4a5b1216
commit d28dda73ae

View file

@ -1109,6 +1109,7 @@ class API(ox.API):
def upload_chunks(self, url, filename, data=None):
resume = None
init_data = data
if self._resume_file and os.path.exists(self._resume_file):
with open(self._resume_file) as f:
try:
@ -1123,7 +1124,7 @@ class API(ox.API):
data = None
while not data:
try:
data = self._json_request(url, data)
data = self._json_request(url, init_data)
except KeyboardInterrupt:
print("\ninterrupted by user.")
sys.exit(1)