After 4.9.0 version, WordPress File Upload plugin supports Microsoft OneDrive uploads. Administrators can choose to transfer the files uploaded by their website visitors to a Microsoft OneDrive account.
To enable Microsoft OneDrive uploads, we first need to define a Microsoft OneDrive account and allow the plugin to have access to it. We do this very easily by going to the plugin’s Settings in Dashboard:
There is a Microsoft OneDrive Uploads option there which shows that Microsoft OneDrive Uploads are not activated and prompts to press the “Press here” button. By pressing this button, a new page (or tab) appears first asking to select a Microsoft Live account and then informing that “WordPress File Upload Plugin wants to access OneDrive files and your info” as shown below:
Press the Allow button to go to the next screen, which displays a code:
Copy the code and paste it into the textbox of the Microsoft OneDrive Uploads option in plugin’s Settings as follows:
After pressing the Finish button, approval process will complete and you will see the “Activated” text, as shown below:
Now you are ready to enable Microsoft OneDrive uploads to your WordPress File Upload plugin instances, by adding manually the attribute onedrive=”true” inside the plugin’s shortcode. If you wish to use the Shortcode Composer, then go to Interoperability tab and enable the option “Upload to Microsoft OneDrive”, as shown below:
Another 4 Microsoft OneDrive options are provided:
- The ability to define the destination directory at the Microsoft OneDrive account by setting onedrivepath attribute into the shortcode, or by setting Microsoft OneDrive Path option using the Shortcode Composer. If this directory does not exist, it will be created when a file is transferred to the Microsoft OneDrive account. If no destination path is set, files will be transferred to the root of Microsoft OneDrive account.
- The ability to add the submitted userdata, if the upload form contain userdata, to the Microsoft OneDrive file by setting onedriveuserdata attribute into the shortcode, or by setting Include Userdata option using the Shortcode Composer. Microsoft OneDrive allows to add a description for each file, so the submitted userdata are added in file’s description, as shown below:
- The ability to determine if the local file will be deleted or not, by setting the value “delete” or “keep” in onedrivelocal attribute into the shortcode, or by setting Local File Action option using the Shortcode Composer.
- The ability to define what will happen if a file with the same filename already exists at the destination folder of Microsoft OneDrive account by setting onedriveconflict attribute into the shortcode, or by setting Conflict Policy option using the Shortcode Composer. Three options are available, ‘fail’, ‘replace’ or ‘rename’. If ‘fail’ is selected, then the uploaded file will not be stored in Microsoft OneDrive account. If ‘replace’ is selected, then the uploaded file will replace the existing one. If ‘rename’ is selected, then the uploaded file will get a new filename when stored in Microsoft OneDrive account, so that both files remain.
After enabling Microsoft OneDrive uploads, files uploaded through the WordPress File Upload plugin will be transferred to the Microsoft OneDrive account that we have set.
For any questions, problems or suggestions, please contact us.
The Iptanus team