Skip to content

Commit

Permalink
Merge pull request #19 from upyun/sabakugaara-patch-1
Browse files Browse the repository at this point in the history
fix issue18
  • Loading branch information
sabakugaara authored Dec 25, 2016
2 parents 10939df + 9ff36c4 commit bfc0ccd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Upyun/Api/Multi.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private function initRequest($path, Psr7\Stream $stream, $fileHash, $params) {

private function blockUpload($blocksInfo, $blockId, Psr7\Stream $stream, $params = []) {
$startPosition = $blockId * $this->config->maxBlockSize;
$endPosition = $blockId >= $blocksInfo->blocks - 1 ? $stream->getSize() : $startPosition + $this->blockSize;
$endPosition = $blockId >= $blocksInfo->blocks - 1 ? $stream->getSize() : $startPosition + $this->config->maxBlockSize;

$stream->seek($startPosition);

Expand Down Expand Up @@ -141,4 +141,4 @@ private function endRequest($initInfo, $data = array()) {
]);
return $response;
}
}
}

0 comments on commit bfc0ccd

Please sign in to comment.