protected function getType($file)
    {
        $extension = $file->ext();
        if (isset($this->typeMap[$extension])) {
            return $this->typeMap[$extension];
        }

        return $file->mime() ?: 'application/octet-stream';
    }
protected function getType($file)
    {
        $extension = $file->ext();
        if (isset($this->typeMap[$extension])) {
            return $this->typeMap[$extension];
        }

        return $file->mime() ?: 'application/octet-stream';
    }
protected function getType ( $ file ) { $ extension = $ file -> ext ( ) ; if ( isset ( $ this -> typeMap [ $ extension ] ) ) { return $ this -> typeMap [ $ extension ] ; } return $ file -> mime ( ) ? : 'application/octet-stream' ; }
Return the type from a File object

@param File $file The file from which you get the type
@return string
Return the type from a File object