Forum Moderators: coopster
One issue is the headers that we send. A complete list of headers to ensure all browsers download the file would be a good starting point.
I need to develop a rock-solid download application - preferably with completion notification. Has anyone come across anything like this?
$fp = fopen($Path,"r");
header( "Cache-control: private" );
header( "Content-type: " . $FileData[mime_fullsize] );
header( "Content-length: " . $Bytes );
header( "Content-Disposition: attachment; filename=" . $FileName );
fpassthru($fp);
download.php file:
<?php
header("Content-Type: " . filetype($file));
header("Content-Disposition: attachment; filename=$file");
readfile($file);
?>
$file was passed to this page via HTML file with link:
<a href="download.php?file=test.jpg">Download File</a>
Dunno if this helps you at all.
Steve