I have a thumbnail image inside of an A tag. The src of the a tag leads to a php file that will get the original image from a protected directory outside public_http and push the picture out to the visitor. The url simply looks like this: http://mysite.com/sendFile.php?filename=hello.jpeg
When I click on the image thumbnail, Firefox and IE prompt me to download the image. How do I get it to just show the image instead of trying to download it?
Here is what I am doing now:
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false);
header("Content-Type: video/mp4");
header("Content-Disposition: inline; filename=\"".basename($file)."\";" );
header("Content-Type: application/octet-stream");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($file));
$fp = fopen($file, 'rb');
$buffer = fread($fp, filesize($file));
fclose($fp);
print $buffer;
Thank you
gBrent