public function uploadFile($id, $content, $params = [])
    {
        if (empty($id)) {
            throw new \InvalidArgumentException('Record Id is required and cannot be empty.');
        }
        $params['id'] = $id;

        if (substr($content, 0, 4) === 'http') {
            $params['attachmentUrl'] = $content;
        } else {
            $params['content'] = $content;
            if (function_exists('curl_file_create')) { // php 5.6+
                $params['content'] = curl_file_create($content);
            }
        }

        return $this->call('uploadFile', $params);
    }