Skip to content

Commit 4cf1296

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 2a82afd + 80c9b35 commit 4cf1296

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/SharePoint/UploadSession.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,13 @@ function buildQuery($files, $sourcePath, $targetFileName, callable $chunkUpload
4444
if ($firstChunk) {
4545
$uploadFile->startUpload($this->uploadSessionId, $buffer);
4646
$firstChunk = false;
47-
} elseif ($fileSize == $bytesRead) {
48-
$this->targetFile = $uploadFile->finishUpload($this->uploadSessionId,$offset, $buffer);
4947
} else {
5048
$uploadFile->continueUpload($this->uploadSessionId,$offset, $buffer);
5149
}
5250
$offset = $bytesRead;
51+
if ($fileSize == $bytesRead) {
52+
$this->targetFile = $uploadFile->finishUpload($this->uploadSessionId,$offset, '');
53+
}
5354
}
5455
fclose($handle);
5556

0 commit comments

Comments
 (0)