public function getUploadUrl(LibraryType $library, bool $newFile = true)
    {
        $url = $this->client->getConfig('base_uri')
            . '/repos/'
            . $library->id
            . '/' . ($newFile ? 'upload' : 'update') . '-link/';

        $response = $this->client->request('GET', $url);
        $uploadLink = (string)$response->getBody();

        return preg_replace("/\"/", '', $uploadLink);
    }
public function getUploadUrl(LibraryType $library, bool $newFile = true)
    {
        $url = $this->client->getConfig('base_uri')
            . '/repos/'
            . $library->id
            . '/' . ($newFile ? 'upload' : 'update') . '-link/';

        $response = $this->client->request('GET', $url);
        $uploadLink = (string)$response->getBody();

        return preg_replace("/\"/", '', $uploadLink);
    }
public function getUploadUrl ( LibraryType $ library , bool $ newFile = true ) { $ url = $ this -> client -> getConfig ( 'base_uri' ) . '/repos/' . $ library -> id . '/' . ( $ newFile ? 'upload' : 'update' ) . '-link/' ; $ response = $ this -> client -> request ( 'GET' , $ url ) ; $ uploadLink = ( string ) $ response -> getBody ( ) ; return preg_replace ( "/\"/" , '' , $ uploadLink ) ; }
Get upload URL

@param LibraryType $library Library instance
@param bool        $newFile Is new file (=upload) or not (=update)

@return String Upload link
@throws \GuzzleHttp\Exception\GuzzleException
Get upload URL