$headers = array(
"Authorization: Zoho-oauthtoken " . $accessToken
);
$nombreArchivo = basename($filePath);
$archivo = new \CURLFile(
$filePath,
'image/jpg',
$nombreArchivo
);
$parametros = array(
"filename" => $filePath,
"parent_id" => "8xxxxxxxxxxxxxxxxxxxxxxxxxc",
"override-name-exist" => 1,
"content" => $archivo
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://workdrive.zoho.com/api/v1/upload" );
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($parametros));
$userResult = curl_exec($ch);