After 4.6.0 version, WordPress File Upload plugin supports Google Drive uploads. Administrators can choose to transfer the files uploaded by their website visitors to a Google Drive account.

To enable Google Drive uploads, we first need to define a Google Drive 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 Google Drive Uploads option there which shows that Google Drive 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 Google account and then informing that “WordPress File Upload Plugin wants to access your Google Account” 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 Google Drive 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 Google Drive uploads to your WordPress File Upload plugin instances, by adding manually the attribute gdrive=”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 Google Drive”, as shown below:

Another 4 Google Drive options are provided:

  • The ability to define the destination directory at the Google Drive account by setting gdrivepath attribute into the shortcode, or by setting Google Drive Path option using the Shortcode Composer. If this directory does not exist, it will be created when a file is transferred to the Google Drive account. If no destination path is set, files will be transferred to the root of Google Drive account.
  • The ability to add the submitted userdata, if the upload form contain userdata, to the Google Drive file by setting gdriveuserdata attribute into the shortcode, or by setting Include Userdata option using the Shortcode Composer. Google Drive 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 gdrivelocal attribute into the shortcode, or by setting Local File Action option using the Shortcode Composer.
  • The ability to trash any files in Google Drive destination folder having the same filename as the uploaded file, by setting gdriveduplicates attribute into the shortcode, or by setting Trash Duplicates option using the Shortcode Composer. It is noted that Google Drive allows files and subfolders with identical names to exist in the same folder, so this attribute ensures that only one file with the same name exists, overwriting any previous files.

After enabling Google Drive uploads, files that uploaded through the WordPress File Upload plugin will be transferred to the Google Drive account that we have set.

For any questions, problems or suggestions, please contact us.

The Iptanus team

Google Drive Uploads with WordPress File Upload Plugin

31 thoughts on “Google Drive Uploads with WordPress File Upload Plugin

  • after having uploaded, I found my file in the uploads section with a link to “Send to Google Drive”
    as that was clearly my intention can, I get it to automate this, and send it straight after upload?

    1. Yes you can configure the plugin so that uploaded files are transferred to Google Drive automatically. Here is the link with instructions.

      Regards

      Nickolas

  • Our company is interested in buying your PRO version, however we have some questions.

    1. Is there a file upload max size?

    2. Can we bypass uploading to our media folder? We would just like the file that is uploaded go straight to a google drive folder and not reside on our server. Thanks.

    1. Hi, here are answers:

      1. Yes there is a setting to define max upload size.
      2. Files are first uploaded to the website and they are then transferred automatically by the plugin to the google drive folder. However there is an option to delete the local file (in the website) after transfer is complete.

      Regards

      Nickolas

  • Hi,

    I am testing the Google Drive upload function in the pro version and need some guidance. I created a folder called “mtest” under the root of my google drive, and then under the Plugin Settings I entered “mtest” as the Google Drive Default Path. I also went to the Interoperability tab and set the Google Drive Path there to testsite/%userdata1%. When I did the upload, there were no errors, but the mtest folder in the root of my google drive was empty. It did however create a new root folder called “testsiteBen Mannino” with the file contained inside. So I guess the issue here is how to properly represent a Google Drive path when typing it into these plugin fields. I tried entering “\mtest” as the default folder with no luck. I believe I also experimented with using “\” and “/” and neither seemed to work. Any ideas?

  • Hello.

    Great plugin!

    Q: How can I get list of folders of Google Drive to choose by the user before sending a file?

    Regards!

    Adrian

  • If Google Drive is blocked on the visitor’s country like China, will this still work? Does your uploadered directly upload to Google Drive or does it get uploaded to my website first before moving to Google Drive?

    1. Hi, files are first uploaded to the website and then transferred to Google Drive. So, if your website is in China I am not sure if it will work.

      Regards

      Nickolas

  • Where do you store the data which shows up on the page “List of Uploaded Files” ? I would like to clear that data occasionally.

    1. There is Clear Log button in Maintenance Actions Dashboard page of the plugin that clears data based on a selected period.

      Regards

      Nickolas

  • I have configured it to directly upload the file to Google drive. Although the file get uploaded to the wordpress server, it does NOT get uploaded to google drive. Its showing status : “File is being transferred to google drive:root” on the “List of Uploaded Files” page.
    When I did first setup the plugin, the files where successfully uploading to gdrive. But when I checked after a day, it has stopped uploading any new files.
    Can you please help …

  • I tried unlinking the google drive and relinking it. But now the “Press Here” button is not opening the google drive login page.

  • Below is the error I get when I click on “Google Drive Uploads: Press Here” button.

    20200523T171436: http://www.xyz.com/wp-admin/admin-ajax.php
    PHP Warning: file_get_contents(https://iptanusservices.appspot.com/wp-admin/admin-ajax.php): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found

    in /hermes/bosnacweb02/bosnacweb02bg/b1720/sl.mysite/public_html/wp-content/plugins/wordpress-file-upload-pro/lib/wfu_functions.php on line 7751
    PHP Fatal error: Uncaught Error: Call to a member function createAuthUrl() on null in /hermes/bosnacweb02/bosnacweb02bg/b1720/sl.mysite/public_html/wp-content/plugins/wordpress-file-upload-pro/extensio

    1. Hi, I just tested it in my environment. I cannot reproduce your problem. Set Post Method option in Settings to cURL. Then try to connect to Google Drive again. Does it work?

      Nickolas

      1. Below is the error with cUrl switched on:

        20200525T121002: http://www.banc-online.org/wp-admin/admin-ajax.php
        PHP Fatal error: Uncaught Error: Call to a member function createAuthUrl() on null in /hermes/bosnacweb02/bosnacweb02bg/b1720/sl.ncbongs/public_html/wp-content/plugins/wordpress-file-upload-pro/extensions/wfu_gdrive/_wfu_gdrive.php:9
        Stack trace:
        #0 /hermes/bosnacweb02/bosnacweb02bg/b1720/sl.ncbongs/public_html/wp-content/plugins/wordpress-file-upload-pro/extensions/wfu_gdrive/wfu_gdrive_ajaxactions.php(22): wfu_gdrive_authorize_app_start()
        #1 /hermes/bosnacweb02/bosnacweb02bg/b1720/sl.ncbongs/public_html/
        20200525T121006: http://www.banc-online.org/wp-admin/admin-ajax.php
        PHP Fatal error: Uncaught Error: Call to a member function createAuthUrl() on null in /hermes/bosnacweb02/bosnacweb02bg/b1720/sl.ncbongs/public_html/wp-content/plugins/wordpress-file-upload-pro/extensions/wfu_gdrive/_wfu_gdrive.php:9
        Stack trace:
        #0 /hermes/bosnacweb02/bosnacweb02bg/b1720/sl.ncbongs/public_html/wp-content/plugins/wordpress-file-upload-pro/extensions/wfu_gdrive/wfu_gdrive_ajaxactions.php(22): wfu_gdrive_authorize_app_start()
        #1 /hermes/bosnacweb02/bosnacweb02bg/b1720/sl.ncbongs/public_html/

  • 1. uninstalled the plugin
    2. Deleted all the entries from wp-options for this plugin.
    3. Re-installed the plugin.
    4. Configured everything from scratch. But still the google drive signup popup page is not opening. Although I was able to link to a dropbox account successfully.

  • We are looking to upload files on a specific FTP path on the wordpress server to a folder in GDrive. The files should be uploaded (synced) to the GDrive but never removed by the plugin on GDrive.

    The upload will only be for specific folders on the server and not all media ect. Is there away to do this?

  • Hola, he realizado todo el proceso para vincular a Google Drive, está todo ok, pero no llegan los archivos a Google Drive, ¿esto por que puede estar sucediendo? Gracias.

  • Hi

    I have the pro version. I have followed the instructions to set upload files to Google Drive. Google drive uploads “Activate.” The file sits in Pending File Transfer and does not upload to my Google Drive. gdrive=”true” gdriveuserdata=”true”

    Please can you help

  • Hi Nickolas

    The full code
    [wordpress_file_upload uploadpath=”” captcha=”true” forcefilename=”true” duplicatespolicy=”maintain both” uniquepattern=”datetimestamp” placements=”userdata/captcha/title/filename/selectbutton/uploadbutton/subfolders/filelist/message” requiredlabel=”(*)” notify=”true” notifyrecipients=”%userdata2%” notifymessage=”Dear Friend%n%%n%This is an automatic delivery message to notify you that your file has been uploaded.%n%%n%We will contact you shortly.%n%%n%Best Regards%n%%n%SJ” userdata=”true” userdatalabel=”Your Name:|t:text|s:left|r:1|a:0|p:none|d:/Email|t:email|s:left|r:1|a:0|v:1|p:none|d:|g:0/Phone Number (+00)|t:number|s:left|r:0|a:0|v:1|h:0|p:none|d:|f:d/Comments|t:multitext|s:left|r:0|p:none” gdrive=”true” gdriveuserdata=”true”]

    1. Hi, I see so problems. What is your server? 32 or 64bit? and your PHP version? you can see these in plugin’s Main page in Dashboard.

      Nickolas

  • Hi Nickolas

    Please see the details below.

    Status
    Edition Professional
    Version 4.14.4 You have the latest version.
    Server Environment 64bit (Your server supports files up to 1 Exabyte, practically unlimited)
    PHP Version 7.4.10

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.