Skip to content

Commit

Permalink
Fix byte range header on UploadPartCopy - resolves aws#788
Browse files Browse the repository at this point in the history
  • Loading branch information
jeskew committed Oct 5, 2015
1 parent ca3dd59 commit d498723
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/S3/MultipartCopy.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ private function createPart($partNumber, $partsCount)
$startByte = $defaultPartSize * ($partNumber - 1);
$partSize = $partNumber < $partsCount
? $defaultPartSize
: $this->getSourceSize() % $defaultPartSize;
$endByte = $startByte + $partSize;
: $this->getSourceSize() - ($defaultPartSize * ($partsCount - 1));
$endByte = $startByte + $partSize - 1;

return [
'ContentLength' => $partSize,
Expand Down

0 comments on commit d498723

Please sign in to comment.