Send downloads always with content-disposition: attachment header.

This commit is contained in:
Thomas Keller 2012-01-03 18:12:33 +01:00
parent 516640b0cd
commit 850be91695

View File

@ -205,7 +205,8 @@ class IDF_Views_Download
$path = $upload->getFullPath();
$mime = IDF_FileUtil::getMimeType($path);
$render = new Pluf_HTTP_Response_File($path, $mime[0]);
$render->headers["Content-MD5"] = $upload->md5;
$render->headers['Content-MD5'] = $upload->md5;
$render->headers['Content-Disposition'] = 'attachment; filename="'.$upload->file.'"';
return $render;
}