My code is like below:
$final_img = ''; //some image manipulations
header('Content-Description: File Transfer');
header('Content-Type: application/octet-image');
header("Content-disposition: attachment; filename=tests.png");
imagepng($final_img);
My question is, when people click the anchor, it automatically saves the image with the name tests.png. But if the user right click and save link as, they can save the file into whatever name they want. So, how can I prompt a save as dialog when people click a link?