summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/download.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_trashbin/download.php')
-rw-r--r--apps/files_trashbin/download.php7
1 files changed, 1 insertions, 6 deletions
diff --git a/apps/files_trashbin/download.php b/apps/files_trashbin/download.php
index 60328e1dddb..9c9ec436894 100644
--- a/apps/files_trashbin/download.php
+++ b/apps/files_trashbin/download.php
@@ -38,12 +38,7 @@ if(!$view->file_exists($filename)) {
$ftype=$view->getMimeType( $filename );
-header('Content-Type:'.$ftype);if ( preg_match( "/MSIE/", $_SERVER["HTTP_USER_AGENT"] ) ) {
- header( 'Content-Disposition: attachment; filename="' . rawurlencode( basename($filename) ) . '"' );
-} else {
- header( 'Content-Disposition: attachment; filename*=UTF-8\'\'' . rawurlencode( basename($filename) )
- . '; filename="' . rawurlencode( basename($filename) ) . '"' );
-}
+OCP\Response::setContentDispositionHeader(basename($filename), 'attachment');
OCP\Response::disableCaching();
header('Content-Length: '. $view->filesize($filename));