I need to ensure that a file is treated by all browsers as something to download and not open in a new window. Right now the files are coming out of the data [ie file_view.php?ID=68976 ] and users have to right-click or option-click to download. However, we are finding that lots of users - as many as 50 or 60 in a day - can't figure this out, or lose the file, or somehow interrupt the transfer.
I need to develop a rock-solid download application - preferably with completion notification. Has anyone come across anything like this?
One issue is the headers that we send. For instance, here are the headers we are sending with this file [a jpg].
$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);