src/Bynder/Api/Impl/Upload/FileUploader.php
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);
                }
            );
    }
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);
                }
            );
    }
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 ) ; } ) ; }
The upload chunk logic function. Gets the closest Amazon endpoint, uploads the chunk to Amazon and registers it
in Bynder.

@param $filePath
@param $chunk
@param $uploadRequestInfo
@param $numberOfChunks
@param $chunkNumber
@return Promise\PromiseInterface|Promise\FulfilledPromise Value returned not used for next steps, just need to make sure it works.
The upload chunk logic function . Gets the closest Amazon endpoint uploads the chunk to Amazon and registers it in Bynder .