code/libraries/joomlatools/library/dispatcher/response/abstract.php
public function isAttachable()
    {
        $request = $this->getRequest();

        if(!preg_match('#(iPad|iPod|iPhone)#', $request->getAgent()))
        {
            if($request->isDownload() || $this->getContentType() == 'application/octet-stream') {
                return true;
            }
        }

        if((preg_match('#(Edge)#', $request->getAgent())) )
        {
            if($this->getContentType() == 'application/pdf') {
                return true;
            }
        }

        return false;
    }
public function isAttachable()
    {
        $request = $this->getRequest();

        if(!preg_match('#(iPad|iPod|iPhone)#', $request->getAgent()))
        {
            if($request->isDownload() || $this->getContentType() == 'application/octet-stream') {
                return true;
            }
        }

        if((preg_match('#(Edge)#', $request->getAgent())) )
        {
            if($this->getContentType() == 'application/pdf') {
                return true;
            }
        }

        return false;
    }
public function isAttachable ( ) { $ request = $ this -> getRequest ( ) ; if ( ! preg_match ( '#(iPad|iPod|iPhone)#' , $ request -> getAgent ( ) ) ) { if ( $ request -> isDownload ( ) || $ this -> getContentType ( ) == 'application/octet-stream' ) { return true ; } } if ( ( preg_match ( '#(Edge)#' , $ request -> getAgent ( ) ) ) ) { if ( $ this -> getContentType ( ) == 'application/pdf' ) { return true ; } } return false ; }
Check if the response is attachable

A response is attachable if the request is downloadable or the content type is 'application/octet-stream'

If the request is made by an Ipad, iPod or iPhone user agent the response will never be attachable. iOS browsers
cannot handle files send as disposition : attachment.

If the request is made by MS Edge for a pdf file always force the response to be attachable to prevent 'Couldn't
open PDF file' errors in Edge.

@return bool
Check if the response is attachable