diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-01-07 11:06:20 -0800 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-01-07 11:06:20 -0800 |
commit | 2d5427efa99e910abe46f2c6ab567b2392169f26 (patch) | |
tree | cf34ecdace87f8a4d015eaa8920ba89c6bd7394c /apps/files_versions | |
parent | f2fbfbc665b90dbd23c0a353b07fad7c67176a6a (diff) | |
parent | 09bd5bd517fee80e8b44b7645b51a8ba482a4d7c (diff) | |
download | nextcloud-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.php | 7 |
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)); |