Enabling Links to Google Drive Documents
Liferay provides a Marketplace plugin for integrating Documents and Media with Google Drive. When enabled, you can create shortcuts to your Google Drive files that enable you to view and manage them via Documents and Media. This plugin is available for both Liferay Portal CE and Liferay DXP systems. See Installing Apps for how to install the Liferay Plugin for Google Drive.
After installing the plugin, you must set up your Google project and configure Liferay’s Documents and Media application.
The Liferay Plugin for Google Drive is a Labs application available for Liferay CE Portal and Liferay DXP. Labs apps are experimental and not supported by Liferay. They’re released to accelerate the availability of useful and cutting-edge features. This status may change without notice. Use Labs apps at your own discretion.
Setting Up Your Google Project
Enabling the Liferay plugin requires an active Google Project with both the Google Drive API and Google Picker API enabled. The Google Drive API allows users to view and edit Google files (i.e., Docs, Sheets, and Slides) in their native editors. The Picker API allows users to view and select from digital assets (e.g., photos, videos, documents) stored in Google Drive when uploading files to Documents and Media. If you haven’t created a Project yet, see Creating a Google Project. Otherwise, see Enabling APIs to learn how to enable the Picker API for your project.
If desired, you can enable the creation and editing of Google documents via Documents and Media apart from the Liferay Plugin for Google Drive. See Enabling Document Creation and Editing with Google Drive for more information.
Once your Google Project is prepared, you must configure the Documents and Media application via the Liferay control panel. This requires the Picker API key, as well as the OAuth2 client ID and client secret.
Configuring Documents and Media
Follow these steps to configure the Documents and Media application.
Open the Global Menu (), click on the Control Panel tab, and go to System Settings → Documents and Media.
Click on Google Drive under Virtual Instance Scope.
Enter your project’s OAuth 2.0 client ID and client secret.
Enter the Picker API Key.
Click on Save.
Once enabled, users can create Documents and Media shortcuts to Google assets.
To disable this feature, click on the Actions button for Google Drive and select Reset Default Values.
Creating Google Drive Shortcuts
Follow these steps to create Documents and Media shortcuts for Google Drive files.
Open the Documents and Media application in a Site Asset Library.
Click on the Add button () in the Documents and Media tab and select Google Drive Shortcut.
Click on Select File.
Select the desired Google account.
Select the desired Google Drive file.
Enter a name and description for the shortcut.
Click on Publish when finished.
Once published, the Google Drive file can now be accessed and used in Liferay via the Documents and Media application. See Linking to Files on Google Drive for more information.