parent
409b510889
commit
82bf1f9c8c
1 changed files with 2 additions and 1 deletions
|
@ -153,7 +153,8 @@ class OC_Response {
|
|||
* @param string $type disposition type, either 'attachment' or 'inline'
|
||||
*/
|
||||
static public function setContentDispositionHeader( $filename, $type = 'attachment' ) {
|
||||
if ( preg_match( "/MSIE/", $_SERVER["HTTP_USER_AGENT"] ) ) {
|
||||
// Android Chrome user agent: https://developers.google.com/chrome/mobile/docs/user-agent
|
||||
if ( preg_match( '/MSIE/', $_SERVER['HTTP_USER_AGENT'] ) or preg_match( '#Android.*Chrome/[.0-9]*#', $_SERVER['HTTP_USER_AGENT'] ) ) {
|
||||
header( 'Content-Disposition: ' . rawurlencode($type) . '; filename="' . rawurlencode( $filename ) . '"' );
|
||||
} else {
|
||||
header( 'Content-Disposition: ' . rawurlencode($type) . '; filename*=UTF-8\'\'' . rawurlencode( $filename )
|
||||
|
|
Loading…
Reference in a new issue