Skip to content

Commit

Permalink
new file contents
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Nov 16, 2016
1 parent cc1d0f2 commit 6711ab3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dropbox/file.py
Expand Up @@ -128,11 +128,11 @@ def upload_large_file(self, path, target, chunk_size = 41943040):
file = open(path, "rb")
try:
while True:
chunk = file.read()
chunk = file.read(chunk_size)
if not chunk: break
self.session_append_file_v2(session_id, data = chunk, offset = offset)
offset += len(chunk)
finally:
file.close()
self.session_finish_file(session_id, offset = offset, path = target)
return offset
contents = self.session_finish_file(session_id, offset = offset, path = target)
return contents

0 comments on commit 6711ab3

Please sign in to comment.