I find a solution.
I create a custom component in joomla and add code from download.php of sugarcrm,
like this:
$download_location = "crm/cache/upload/" . $idFile;
PHP Code:
header("Pragma: public");
header("Cache-Control: maxage=1, post-check=0, pre-check=0");
header("Content-type: application/force-download");
header("Content-Length: " . filesize($local_location));
header("Content-disposition: attachment; filename=\"".$nomeFile."\";");
header("Expires: 0");
set_time_limit(0);
echo file_get_contents($download_location);
exit();
So I don't must be logged on sugarcrm.
I hope this help some other.
Bookmarks