From: Michael Gapczynski Date: Tue, 8 May 2012 14:27:02 +0000 (-0400) Subject: Set Content-Disposition to attachment for shared private links X-Git-Tag: v4.0.0RC~107 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f6df71b74d556b086bc5c05c141267cd02d93d2f;p=nextcloud-server.git Set Content-Disposition to attachment for shared private links --- diff --git a/apps/files_sharing/get.php b/apps/files_sharing/get.php index 59a4efba6a6..caf25d00cfd 100755 --- a/apps/files_sharing/get.php +++ b/apps/files_sharing/get.php @@ -68,7 +68,7 @@ if (isset($_GET['token']) && $source = OC_Share::getSource($_GET['token'])) { $mimetype = OC_Filesystem::getMimeType($source); header("Content-Transfer-Encoding: binary"); OCP\Response::disableCaching(); - header('Content-Disposition: filename="'.basename($source).'"'); + header('Content-Disposition: attachment; filename="'.basename($source).'"'); header("Content-Type: " . $mimetype); header("Content-Length: " . OC_Filesystem::filesize($source)); //download the file