$filename = 'symfony-1.4.20.tgz';
$file = $this->container-> getParameter('kernel.root_dir' ) . '/../web/data/' . $filename;
$response = new BinaryFileResponse($file);
$response-> trustXSendfileTypeHeader();
$response-> setContentDisposition(
ResponseHeaderBag:: DISPOSITION_INLINE,
$filename,
iconv('UTF-8', 'ASCII//TRANSLIT', $filename)
);
return $response;
Comments
Post a Comment