src/Bynder/Api/Impl/Upload/FileUploader.php
private function getClosestUploadEndpoint()
    {
        if (isset($this->awsBucket)) {
            return new Promise\FulfilledPromise($this->awsBucket);
        } else {
            return $this->requestHandler->sendRequestAsync('GET', 'api/upload/endpoint')
                ->then(
                    function ($result) {
                        $this->awsBucket = $result;
                        return $result;
                    });
        }
    }
private function getClosestUploadEndpoint()
    {
        if (isset($this->awsBucket)) {
            return new Promise\FulfilledPromise($this->awsBucket);
        } else {
            return $this->requestHandler->sendRequestAsync('GET', 'api/upload/endpoint')
                ->then(
                    function ($result) {
                        $this->awsBucket = $result;
                        return $result;
                    });
        }
    }
private function getClosestUploadEndpoint ( ) { if ( isset ( $ this -> awsBucket ) ) { return new Promise \ FulfilledPromise ( $ this -> awsBucket ) ; } else { return $ this -> requestHandler -> sendRequestAsync ( 'GET' , 'api/upload/endpoint' ) -> then ( function ( $ result ) { $ this -> awsBucket = $ result ; return $ result ; } ) ; } }
Gets the closest Amazon S3 bucket location to upload to.

@return Promise\FulfilledPromise Amazon S3 location url.
@throws Exception
Gets the closest Amazon S3 bucket location to upload to .