Set Content-Disposition to attachment for shared private links

This commit is contained in:
Michael Gapczynski 2012-05-08 10:27:02 -04:00
parent 9dee2a6b2c
commit f6df71b74d
1 changed files with 1 additions and 1 deletions

View File

@ -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