After activating the plugin, you will see a new tab under the plugin’s settings called “Storage”. This tab contains the configuration for the custom fields associated with files.
Enter the client ID and client secret from your google account. You would need to set up oauth2 credentials to get these records.
Please follow the instructions below to setup your credentials:
- Login to your google account and go to the API Console here.
- From the projects list, select a project or create a new one.
- If the APIs & services page isn’t already open, open the console left side menu and select APIs & services.
- On the left, click Credentials.
- Click New Credentials, then select OAuth client ID.
- Select the appropriate application type for your project and enter any additional information required.
- Enter your website address in “Authorized JavaScript origins”.
- Go to your plugin’s settings page again and copy the value from “Authorized redirect URL” field and paste it in “Authorized redirect URIs”.
- Click Create client ID.
- Copy the client ID and client secret and paste in the plugin’s settings and click save.
- Then click on connect google account and allow the access to your site when prompted by google.
- On the successful connection, you will see a list of your folders from your google drive account. Select a folder where you want your site files to upload to.
Now, when a user uploads a file on your site via UPF plugin, it gets stored in a folder (that you selected during g-drive integration) in your connected g-drive account instead of your local server storage.
The google drive integration is a one-way integration only which means the files uploaded via the UPF plugin goes to the google drive but files uploaded to the google drive won’t sync with the plugin on your site. Consider this addon as a storage saver on your hosting.
You can always reset your connection if you don’t want to use the g-drive Integration or just deactivate the g-drive addon. Please note that doing so will hide the files that were previously uploaded to the g-drive.
Note: Using the g-drive addon will cause the increased load time as there is extra processing and uploading of the files to remote host (google drive).