Skip to content

Commit

Permalink
fixed upload error
Browse files Browse the repository at this point in the history
  • Loading branch information
jabetcha committed Dec 29, 2018
1 parent b84c68e commit 4244f42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dropbox-upload/dropbox_upload/dropbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def upload_file(dbx, file_path, dest_path):
f = open(file_path, "rb")
file_size = os.path.getsize(file_path)
if file_size <= CHUNK_SIZE:
return dbx.files_upload(f, dest_path)
return dbx.files_upload(f.read(), dest_path)

upload_session_start_result = dbx.files_upload_session_start(f.read(CHUNK_SIZE))
cursor = dropbox.files.UploadSessionCursor(
Expand Down

0 comments on commit 4244f42

Please sign in to comment.