Skip to content

Commit 77586a5

Browse files
fix: Chunked Upload V2 not working on Nextcloud 30 and later (#324)
Previously the chunk number started with 0, which leads to errors. Simple fix: starting chunk number with 1 Fixes: #319 Signed-off-by: DrZoidberg09 <[email protected]> Co-authored-by: Alexander Piskun <[email protected]>
1 parent 2cbf584 commit 77586a5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nc_py_api/files/files.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,8 @@ def __upload_stream(self, path: str, fp, chunk_size: int) -> FsNode:
485485
response = self._session.adapter_dav.request("MKCOL", _dav_path)
486486
check_error(response)
487487
try:
488-
start_bytes = end_bytes = chunk_number = 0
488+
start_bytes = end_bytes = 0
489+
chunk_number = 1
489490
while True:
490491
piece = fp.read(chunk_size)
491492
if not piece:

0 commit comments

Comments
 (0)