src/GoogleDriveAdapter.php
protected function getDownloadUrl($file)
    {
        if (strpos($file->mimeType, 'application/vnd.google-apps') !== 0) {
            return 'https://www.googleapis.com/drive/v3/files/' . $file->getId() . '?alt=media';
        } else {
            $mimeMap = $this->options['appsExportMap'];
            if (isset($mimeMap[$file->getMimeType()])) {
                $mime = $mimeMap[$file->getMimeType()];
            } else {
                $mime = $mimeMap['default'];
            }
            $mime = rawurlencode($mime);

            return 'https://www.googleapis.com/drive/v3/files/' . $file->getId() . '/export?mimeType=' . $mime;
        }

        return false;
    }
protected function getDownloadUrl($file)
    {
        if (strpos($file->mimeType, 'application/vnd.google-apps') !== 0) {
            return 'https://www.googleapis.com/drive/v3/files/' . $file->getId() . '?alt=media';
        } else {
            $mimeMap = $this->options['appsExportMap'];
            if (isset($mimeMap[$file->getMimeType()])) {
                $mime = $mimeMap[$file->getMimeType()];
            } else {
                $mime = $mimeMap['default'];
            }
            $mime = rawurlencode($mime);

            return 'https://www.googleapis.com/drive/v3/files/' . $file->getId() . '/export?mimeType=' . $mime;
        }

        return false;
    }
protected function getDownloadUrl ( $ file ) { if ( strpos ( $ file -> mimeType , 'application/vnd.google-apps' ) !== 0 ) { return 'https://www.googleapis.com/drive/v3/files/' . $ file -> getId ( ) . '?alt=media' ; } else { $ mimeMap = $ this -> options [ 'appsExportMap' ] ; if ( isset ( $ mimeMap [ $ file -> getMimeType ( ) ] ) ) { $ mime = $ mimeMap [ $ file -> getMimeType ( ) ] ; } else { $ mime = $ mimeMap [ 'default' ] ; } $ mime = rawurlencode ( $ mime ) ; return 'https://www.googleapis.com/drive/v3/files/' . $ file -> getId ( ) . '/export?mimeType=' . $ mime ; } return false ; }
Get download url

@param Google_Service_Drive_DriveFile $file

@return string|false
Get download url