In the function[ __put_file_chunked](https://github.com/owncloud/pyocclient/blob/master/owncloud/owncloud.py#L586) instead of chunk_count = size / chunk_size the line should read chunk_count = math.ceil(size / chunk_size) Otherwise the subsequent cast to int(chunk_count) on line 594 may discard the last chunk of a file.