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 | |
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')
-rw-r--r-- | apps/files/download.php | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/apps/files/download.php b/apps/files/download.php index e3fe24e45d7..6b055e99a53 100644 --- a/apps/files/download.php +++ b/apps/files/download.php @@ -37,12 +37,7 @@ if(!\OC\Files\Filesystem::file_exists($filename)) { $ftype=\OC\Files\Filesystem::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: '.\OC\Files\Filesystem::filesize($filename)); |