Overview
With v2.1.4 you can add a portlet that allows users to upload files to the user's cloud drive. Currently supported cloud drives are
- Google Drive
- Dropbox
After the user logs in to the cloud drive and authorizes access to their files (if needed), the user can upload files.
Future: User can select files, but file selection not currently integrated with other uPortal features.
Configuration
Google Drive
You must create an API key with Google using Google Developers Console using the following procedure as of the time of this writing:
- Access Google Developers Console
- Create a new project such as uPortal
- When viewing your project, select Create new Client ID in the Oath section of APIs & auth/Credentials.
- Fill out consent form
- Back on Credentials form create a web application Client ID. You must enter the Authorized Javascript Origins, such as “http://localhost:8080”. Authorized Redirect URIs may be blank.
- Copy the Client ID to the value portlet preference called googleDriveAPIKey. You can enter this as a portlet preference when publishing the portlet. Alternately if you are modifying the portlet.xml it would look as follows:
<preference> <name>googleDriveAPIKey</name> <value>11bogus6-ij1p55d6nl87drbl5627o1grvp6qc34e.apps.googleusercontent.com</value> </preference>
Dropbox
You must create an API key with Dropbox using the Dropbox App Console using the following procedure as of the time of this writing:
- Access using the Dropbox App Console.
- Click Create app button. Select Drop-ins app and fill out the form.
- Copy the App Key to the portlet preference called dropboxAPIKey. You can enter this as a portlet preference when publishing the portlet. If you are modifying the portlet.xml it would look as follows:
<preference> <name>dropboxAPIKey</name> <value>sbogusscr0966q</value> </preference>
Notes:
Both Google Drive and Dropbox allow you to have an icon for your uPortal install. The icons will displayed during oAuth handshake. Icons are 64x64 and 256x256.