private function uploadChunkAsync($filePath, $chunk, $uploadRequestInfo, $numberOfChunks, $chunkNumber)
    {
        return $this->amazonApi->uploadPartToAmazon($filePath, $this->awsBucket, $uploadRequestInfo,
            $chunkNumber, $chunk, $numberOfChunks)
            ->then(
                function () use ($uploadRequestInfo, $chunkNumber) {
                    return $this->registerChunkAsync($uploadRequestInfo, $chunkNumber);
                }
            );
    }