SevenShores\Hubspot\Resources\Files::replace PHP Method

replace() public method

Upload a replacement file.
public replace ( integer $file_id, string $file ) : Response
$file_id integer The file ID
$file string The file path
return 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);
    }