src/VK/TransportClient/Curl/CurlHttpClient.php
public function upload(string $url, string $parameter_name, string $path): TransportClientResponse {
        $payload = array();
        $payload[$parameter_name] = (class_exists('CURLFile', false)) ?
            new \CURLFile($path) : '@' . $path;

        return $this->sendRequest($url, array(
            CURLOPT_POST       => 1,
            CURLOPT_HTTPHEADER => array(
                static::HEADER_UPLOAD_CONTENT_TYPE,
            ),
            CURLOPT_POSTFIELDS => $payload
        ));
    }
public function upload(string $url, string $parameter_name, string $path): TransportClientResponse {
        $payload = array();
        $payload[$parameter_name] = (class_exists('CURLFile', false)) ?
            new \CURLFile($path) : '@' . $path;

        return $this->sendRequest($url, array(
            CURLOPT_POST       => 1,
            CURLOPT_HTTPHEADER => array(
                static::HEADER_UPLOAD_CONTENT_TYPE,
            ),
            CURLOPT_POSTFIELDS => $payload
        ));
    }
public function upload ( string $ url , string $ parameter_name , string $ path ) : TransportClientResponse { $ payload = array ( ) ; $ payload [ $ parameter_name ] = ( class_exists ( 'CURLFile' , false ) ) ? new \ CURLFile ( $ path ) : '@' . $ path ; return $ this -> sendRequest ( $ url , array ( CURLOPT_POST => 1 , CURLOPT_HTTPHEADER => array ( static :: HEADER_UPLOAD_CONTENT_TYPE , ) , CURLOPT_POSTFIELDS => $ payload ) ) ; }
Makes upload request.

@param string $url
@param string $parameter_name
@param string $path

@return TransportClientResponse
@throws TransportRequestException
Makes upload request .