From 850be9169542411a72ea606ccd989e2548eaf83f Mon Sep 17 00:00:00 2001 From: Thomas Keller Date: Tue, 3 Jan 2012 18:12:33 +0100 Subject: [PATCH] Send downloads always with content-disposition: attachment header. --- src/IDF/Views/Download.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/IDF/Views/Download.php b/src/IDF/Views/Download.php index 1444629..637e25e 100644 --- a/src/IDF/Views/Download.php +++ b/src/IDF/Views/Download.php @@ -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; }