Hi,
I'm working on an old known problem: A JPG file has to be downloaded (not
shown) in the browser. This is my current code:
header('Content-Type: application/octet-stream');
header('Content-Length:
'.filesize($_REQUEST["filepath"].$_REQUEST["file"]));
if (strstr($_SERVER['HTTP_USER_AGENT'], "MSIE")) {
header('Content-Disposition: attachment;
filename="'.$_REQUEST["file"].'"');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
} else {
header('Content-Disposition: attachment;
filename="'.$_REQUEST["file"].'"');
header('Pragma: no-cache');
}
readfile($_REQUEST["filepath"].$_REQUEST["file"]);
This works fin with IE und Netsc. , Mozilla Linux etc. But not on mac's
safari.
What is the problem, what must i do to force the safari's download.
Regards,
Frank