Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
vgrem committed Jul 15, 2023
2 parents 2a82afd + 80c9b35 commit 4cf1296
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/SharePoint/UploadSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@ function buildQuery($files, $sourcePath, $targetFileName, callable $chunkUpload
if ($firstChunk) {
$uploadFile->startUpload($this->uploadSessionId, $buffer);
$firstChunk = false;
} elseif ($fileSize == $bytesRead) {
$this->targetFile = $uploadFile->finishUpload($this->uploadSessionId,$offset, $buffer);
} else {
$uploadFile->continueUpload($this->uploadSessionId,$offset, $buffer);
}
$offset = $bytesRead;
if ($fileSize == $bytesRead) {
$this->targetFile = $uploadFile->finishUpload($this->uploadSessionId,$offset, '');
}
}
fclose($handle);

Expand Down

0 comments on commit 4cf1296

Please sign in to comment.