WP File Download Addon documentation

 

Introduction

WP File download got an addon that adds several features: Google Drive synchronization, DropBox synchronization, OneDrive synchronization, Social file locker. It has to be installed as a separated plugin.

 

WP-file-download-main

 

I. WP FILE DOWNLOAD ADDON INSTALL

1.1 Install

In order to install our plugin addon, you should use standard WordPress installer or unzip and put all the folder in /wp-content/plugin.

 

 

Then click on activate plugin, to see WP File Download menu appear on the WordPress left menu.

WP File download addon will add the features in the default WP File Download environment.

1.2 Update the addon

In order to update the WP File Download, you can use the WordPress default updater. You can also remove and install the new version from a .zip file downloaded on www.joomunited.com. In any case, you won’t lose any content because everything is stored in the database.

 

update-wpfd-addon

 

Be sure to always have the latest version to avoid security and stability problem.

To update the paid version, you need to login to your JoomUnited account from the WordPress settings: Settings > General.

 

 

Then use your JoomUnited account login and password. After a successful login, the button turns to blue with a text Disconnect my JoomUnited account.

 

 

Then finally, you can update all the JoomUnited commercial plugins from the WordPress standard updated.

 

update-wpfd-addon-finish

 

II. GOOGLE DRIVE INTEGRATION

2.1 Create a Google Drive App

The Google Drive integration is distributed as a separate Add-on. You need to install this add-on (plugin) additionally to WP File Download. The addon includes integration for Dropbox and OneDrive too.

First, you need a Google dev App to connect your website to Google Drive. Go to https://console.developers.google.com/project and create a new project.

 

Create-project-1

 

Then set up a project name (no accent)

 

project-name

Then wait a few seconds for the project creation…

 

 

If it's the first time you're using the Google Drive API, you should go to Navigation menu > APIs and Services > Library to activate it.

 

enable-api

 

From the left menu, click on “Navigation menu > APIs and Services”

 

credentials-menu-1

 

Then on the left menu “Credentials” >> “New credentials” >> OAuth client ID (if asked, add a name to your OAuth consent screen).

 

create-Credentials-1

 

Now, the most important step.

  • Select “Web application” and add a name of your choice.
  • Authorized JavaScript origin: https://your-domain.com (replace by your domain name, no slash, no www.)
  • Authorized redirect URIs: https://your-domain.com/wp-admin/admin.php?page=wpfdAddon-cloud&task=googledrive.authenticate (replace by your domain name)

 

create-web-application

 

Note: if this warning appears: "Invalid Origin: domain must be added to the authorized domains list before submitting", press authorized domains list link or go to APIs & Services >> OAuth consent screen, then add your domain name at Authorized domains.

 

consent-screen

 

Then… voilà! You got your ID and Secret to add in the WP File Download configuration

 

oauth-client

 

In order to use "the sync with Google Drive in real time" feature, you need to verify your Domain. You should follow these steps below:

Please go to “APIs & Services” >> "Domain verification", click on Add domain button. Next, input your domain and click on Add domain button.

 

add-domain

 

If your domain was verified, then you add domain successfully. Go to WP File download configuration for the next step.

 

add-verify-domain

 

If your domain has not been verified, a pop-up window will be appeared, click on Take me there button.

 

take-me-there

 

You will be linked to "Webmaster Central" page. From here, you should:

  • Select your domain name provider, if the list does not include your provider, choose Other
  • Add the TXT record to the DNS configuration. E.g: google-site-verification=vyV1rZfPloPdrFjau0Hw2W9d18_bd...
  • Click on Verify button
     

verify-domain

 

The page with successful notification will be shown if you do correctly the steps above. After that, go to the WP File download configuration for the next step.

 

verify-success

 

2.2 Login to Google Drive in WP File Download

Then go back in WordPress admin and click on the menu WP File Download > Configuration > Cloud Connection tab > Google Drive settings section. Paste your

  • Client ID
  • Client secret

Then save the configuration and click on the Connect Google Drive button to login your Google account.

 

google-drive-connect

 

After that, a pop-up window will be shown and you can select your account.

If you haven’t made any mistake you should validate the authorization in a new window like bellow

 

confirm-autho

 

The connection should be a success ☺ Simultaneously, you will see the option "Watch changes from Google Drive" is turned on. If you turn off Files and Folders will not be synchronized immediately from Google Drive to your WP File Download.

 

watch-change-google-fd

 

Then you can create Google Drive folders and upload files in it!

 

create-googledrive-cat

 

2.3 How it works? What can I do with GG Drive?

How does it work? 

WP File download will generate a root folder on your Google Drive with the site name

 

WordPress file manager: Synchronization to Google Drive


All the categories and subcategories added in WP File Download will be added under this folder.

What are the sync directions?

It works in both directions! You can add a file from Google Drive and see it in WP File Download or add a file in WP File Download and see it in Google Drive. It also means you can manage WordPress files from your desktop using Google Drive sync software. That’s crazy! Yes we know ☺

Also if you erase a file from Google Drive you have to empty trash to erase it from Google Drive.

 

Google Drive files sent to WordPress

 

Get rid of the error: error: "invalid_scope when connecting WP File Download with Google Drive"

Google has recently introduced a new security layer that forces apps to be verified.  If you've created the app with your Google account and then you log in from WordPress with the very same account you won't see this error.
This error will only appear if you've created an App with a Google account and trying to connect to Google from WordPress with another account.

In this case, you need your app to get approved by Google following this process: https://support.google.com/code/contact/oauth_app_verification

 

 

III. DROPBOX INTEGRATION

3.1 Create a Dropbox App


The Dropbox integration is distributed as a separate Add-on. You need to install this add-on (plugin) additionally to WP File Download. The addon includes integration for Google Drive and OneDrive too.

First, you need a Dropbox App to connect your website to a Dropbox account. Go to https://www.dropbox.com/developers and create a new app. 

 

create-dropbox-app

 

Then set up an app type "Dropbox API", "Full Dropbox" and an app name.

File categories from WP File download will be added as folders @ the root of your Dropbox account (great for a dedicated Dropbox account). If you select "App folder" all folders/files will be stored under a single folder (avoid the mess in your Dropbox account).

 


Then you're almost done, your app is created and you got your App key and secret.

 

3.2 Login to Dropbox in WP File Download

Then go back in WordPress admin and click on the menu WP File Download > Configuration > Cloud Connection tab > Dropbox settings section. Paste your

  • App key
  • App secret

Then save the configuration and click on the Dropbox connection button.

 

dropbox-connect

 

You'll have to validate the access authorization for app access, just click allow.

 

 

Finally, an authorization code will be generated and you'll have to copy it in WP File Download configuration.

 

API-Request-Authorized

 

 The connection should be a success ☺ Then you can create folders, subfolders in Dropbox and in WP File download, everything will be sync!

 

create-dropbox-cat

 

3.3 How it works? What can I do with Dropbox?

How does it work? 

Dropbox can sync folders/subfolders and files on your WP File download interface and the same is possible on the other way (from WP File download to Dropbox).

 

 

What are the sync directions?

It works in both directions! You can add a file from Dropbox and see it in WP File Download or add a file in WP File Download and see it in Dropbox. It also means you can manage WP File Download files from your desktop using Dropbox sync software. That’s crazy! Yes we know ☺

 

wpfd-dropbox-cat

 

IV. ONEDRIVE INTEGRATION

4.1 Microsoft OneDrive Application

The OneDrive integration is distributed as a separate Add-on. You need to install this add-on (plugin) additionally to WP File Download. The addon includes integration for Google Drive and Dropbox too.

First, you need a Microsoft Azure App to connect your website to a OneDrive account. Go to: https://portal.azure.com/, login and click on New registration button.

 

add-microsoft-app

 

On Register an application form, setup an app name and copy your website URL into the Redirect URL field and click on the Register button.

 

copy-URL

 

Note: The Redirect URIs Server should be https://.

Then you're almost done, from here you have an Application ID (Client ID), only the password is missing. On the left menu, go to Certificates & secrets, then click on the New client secret button to create one. After that, fill the Description and set the Expires for it.

 

new-password-1

 

A password (Client Secret) is generated right away after pressing on Add button, then remember to make a copy.

 

password-generate

 

4.2 Login to OneDrive

Then go back in WordPress admin and click on the menu WP File Download > Configuration > Cloud Connection tab > Onedrive settings section. Paste your

  • Client ID
  • Client Secret

 

credentials-copy

 

After that, save the configuration and then click on the Connect OneDrive button.

 

connect-onedrive

 

You'll have to validate the access authorization for app access, just click Yes.

 

app-authorisation

 

The connection should be a success ☺ Then you can create files, folders and subfolders in OneDrive and in WP File Download, everything will be synchronized!

 

wordpress-to-onedrive

 

Note: WP File download addon does not support Business account

V. SOCIAL LOCKER

5.1 Social locker configuration

WP File Download Social Locker will lock your files download behind a set of social buttons unless the visitor likes, shares the content on Facebook or tweets your page. It helps to improve the social performance of your website, get more likes/shares, build quality followers and attract more traffic from social networks. The addon also includes the features: Google drive and Dropbox file and folder synchronization.

From the plugin configuration you can activate the social locker: WP File Download > Configuration > Social Locker tab.

 

social-locker-tab

 

Facebook Locker

Facebook locker: lock file download with a Facebook share or like.
FB locker option: share a page URL or like your Facebook page to unlock.
The Facebook like locker can be activated right away it does not require any App.

 

facbook-option

 

To enable the social locker, you need to create a Facebook App. In order to create a Facebook App ID, you can access here: https://developers.facebook.com
First, you need to Register.

 

 

Then, you can create your new App ID.

 

 

Finally, copy and paste the code to Facebook App ID.

 

 

The other options are:

  • Force share Url: force an URL for all facebook sharing instead of the current page URL
  • Facebook language: frontend language for social buttons

Twitter Locker

The locker types are:

  • Twitter locker: lock file download with a Twitter tweet or follow
  • Twitter locker option: tweet or follow your twitter to unlock

 

twitter-option

 

The other locker options are:

  • User to follow: set an URL of your Twitter profile (for example https://twitter.com/JoomUnited)
  • Force URL to tweet: force an URL for all Twitter sharing instead of the current
  • Tweet: default tweet content, default content, can be edited by user
  • Via: add the screen name of the user to attribute the Tweet
  • Session duration (sec): when a file is unlocked, determine how long the user will be able to download the file without re-sharing it

5.2 Use the Social locker

Then, in order to lock single file or category, you need to switch Lock content by social to YES in the right column when you have opened your file manager.

 

easy-file-lock