summaryrefslogtreecommitdiffstats
path: root/apps/files_versions
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-01-07 11:06:20 -0800
committerThomas Müller <thomas.mueller@tmit.eu>2014-01-07 11:06:20 -0800
commit2d5427efa99e910abe46f2c6ab567b2392169f26 (patch)
treecf34ecdace87f8a4d015eaa8920ba89c6bd7394c /apps/files_versions
parentf2fbfbc665b90dbd23c0a353b07fad7c67176a6a (diff)
parent09bd5bd517fee80e8b44b7645b51a8ba482a4d7c (diff)
downloadnextcloud-server-2d5427efa99e910abe46f2c6ab567b2392169f26.tar.gz
nextcloud-server-2d5427efa99e910abe46f2c6ab567b2392169f26.zip
Merge pull request #6290 from owncloud/files-androidcontentdisposition
Files androidcontentdisposition
Diffstat (limited to 'apps/files_versions')
-rw-r--r--apps/files_versions/download.php7
1 files changed, 1 insertions, 6 deletions
diff --git a/apps/files_versions/download.php b/apps/files_versions/download.php
index 040a662e61b..2fe56d2e638 100644
--- a/apps/files_versions/download.php
+++ b/apps/files_versions/download.php
@@ -36,12 +36,7 @@ $view = new OC\Files\View('/');
$ftype = $view->getMimeType('/'.$uid.'/files/'.$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($versionName));