PHP Create Download Link -
<?php $file = sevence_data_root."/resource/devdemo/promo_card.tiff"; header('content-description: file transfer'); header('content-type: application/tiff'); header("content-type: application/force-download");// browsers need header("content-disposition: attachment; filename=promo_card.tiff"); header('expires: 0'); header('cache-control: must-revalidate, post-check=0, pre-check=0'); header('pragma: public'); header('content-length: ' . filesize($file)); ob_clean(); flush(); readfile($file); exit; ?> my issue download image can't viewed. can me issue?
content-type: application/force-download");// browsers need no browser need this. it's dirty glitch..
reasons why file cannot opened:
you have space or invisible characters @ beginning of script
the path loading file might wrong , doesn't read (what size downloaded file?)
the file corrupt
you don't have
tiff-viewer
the correct mime type image/tiff (instead of application/tiff)
Comments
Post a Comment