* @copyright 2007-2011 PrestaShop SA * @version Release: $Revision: 6594 $ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ require(dirname(__FILE__).'/config/config.inc.php'); require(dirname(__FILE__).'/init.php'); $a = new Attachment((int)(Tools::getValue('id_attachment')), (int)($cookie->id_lang)); header('Content-Transfer-Encoding: binary'); header('Content-Type: '.$a->mime); header('Content-Length: '.filesize(_PS_DOWNLOAD_DIR_.$a->file)); header('Content-Disposition: attachment; filename="'.utf8_decode($a->file_name).'"'); readfile(_PS_DOWNLOAD_DIR_.$a->file); exit;