SevenShores\Hubspot\Resources\Files::replace PHP 메소드

replace() 공개 메소드

Upload a replacement file.
public replace ( integer $file_id, string $file ) : Response
$file_id integer The file ID
$file string The file path
리턴 SevenShores\Hubspot\Http\Response
    function replace($file_id, $file)
    {
        $endpoint = "https://api.hubapi.com/filemanager/api/v2/files/{$file_id}";
        $options['body'] = ['files' => fopen($file, 'rb')];
        return $this->client->request('post', $endpoint, $options);
    }