How to Provide Google Drive Downloads in OSDownloads

How to Add a Google Document to OSDownloads

A few of our customers asked how to set OSDownloads in their Joomla site for a repository of downloadable Google text documents.

Instead of allowing people to simply visit the Google Drive documents, these users wanted to provide them with a direct download link. Users will click the link in OSDownloads and the Google Drive file will download to their desktop.

In this tutorial, you will learn how to configure OSDownloads to offer to your Joomla site visitors a downloadable Google text document.

This is a five-step process:

  1. Upload the required text document to your Google Drive account.
  2. Get your Google text document's ID number.
  3. Create an OSDownloads file with this ID number. 
  4. Create the file's front end menu item.
  5. Test the Google Document download.

In the first step, you upload a required document to your Google Drive account. This is where your OSDownloads will be fetching the required Google Document from to your Joomla site visitors for downloading.

Once the document has been uploaded, you need to copy its ID number. You will use it to tell your OSDownloads where to fetch the file from.

In the third step, you create an OSDownloads file. You will set it with the file ID number of your Google Document to be offered for downloads at your Joomla site.

Once you created an OSDownloads file for the Google Document stored at your Google Drive, make it published at your Joomla site front end. You achieve this by creating a front end menu item.

In the last step, you visit your Joomla site front end and test the Google Document downloading.

Let's take a look at this process in more detail. 


Step #1. Upload the required document to Google Drive

Note: If a Google text document that you would like to be downloadable via your OSDownloads already resides on your Google Drive, please skip this step and go to Step #2.

  • Log into your Google Drive account. In the top left corner of the page, click New:

click new

  • In the drop-down menu, click File Upload:

click file upload

  • Upload a required document from your hard drive to your Google Drive. For my tutorial, I've uploaded a text file with dummy placeholder text:

Google Document with lorem ipsum text

Excellent. At your Google Drive, you now have a document to offer for downloads via your Joomla site using OSDownloads Free.

Next, you will create a URL link to this document. You will need this link for your OSDownloads component in Step #3 in a minute.


Step #2. Get the Google text document ID number

  • After the text document upload is over, open it and click Share in the top right corner:

click the share button

  • You should now see the Share with others box. Click Get shareable link:

click get shareable link

  • You should see the URL resembling https://docs.google.com/document/d/1x8Zm7qA6sniuNhEC3St3hC7EZrqocWhgXm1bWIlIweA/edit?usp=sharing.
  • Copy the text document ID number between the /d and /edit?. In my example URL, you would need to copy 1x8Zm7qA6sniuNhEC3St3hC7EZrqocWhgXm1bWIlIweA.
  • Click Done:

copy the id number click done

In a text editor of your choice, create a new URL with the following steps:

  • Copy in the editor the following URL: https://docs.google.com/document/d/FILE_ID/export?format=doc
  • Replace the <FILE_ID> part with the part you just copied from the Google text document URL created by your Google Drive. Using my example, your new file URL should look like https://docs.google.com/document/d/1x8Zm7qA6sniuNhEC3St3hC7EZrqocWhgXm1bWIlIweA/export?format=doc.

Good job! You just created your downloadable Google text document URL. Now let's set your OSDownloads to use this URL and offer this file for downloads on your Joomla site.


Step #3. Create an OSDownloads file with the URL

  • In your Joomla control panel, go to OSDownloads > Files:

go to osdownloads free files

  • You will be taken to the OSDownloads Free: Files administrative page. Click New:

click new

  1. You will see the OSDownloads Free: New File screen. Enter your file name into the Name field. For the purpose of this tutorial, I entered Lorem Ipsum.
  2. Locate the File Type parameter and click Upload.
  3. Click URL:

locate file url parameter click url

  • You will see the File URL field. Paste in it the link you copied in the previous step:

paste url

  • Optionally, enter your file description into the Description text area.
  • In the group of setting to the right, make sure you set the Status parameter to Published:

make sure the status is set to published

  • Click Save & Close.

Excellent! At this point, your Google text document is ready at your Google Drive. Your Joomla and OSDownloads are ready to offer this remotely stored text document to your Joomla site visitors for download. 

Now is a good time to make the file seen by them at the front end of your Joomla site. 


Step #4. Create the OSDownloads file's front end menu item

  • In your Joomla control panel, go to Menus > <Your Required Menu> > Add New Menu Item:

add new menu item

  • Enter your menu item title into the Menu Title field. For my tutorial, I entered Lorem Ipsum.
  • Click Select.

enter menu title click select

You will see the Menu Item Type modal box.

  1. Click OSDownloads Free.
  2. Click Single File:

click single file

  • In the menu item File field select the OSDownloads file you created in Step #3:

make sure your osdownloads file is selected

  • Click Save & Close.

Step #5. Test your OSDownloads/Google Document integration at work

  • Visit your site front end.
  • Click on the downloadable file's new menu item.
  • Click on the Download button:

test your download

  • You will be prompted to download the file onto your hard drive:

lorem ipsum google text document ready for download in doc format

Congratulations! You now know how to add a text Google document to OSDownloads to make it downloadable to your Joomla site visitors.


Additional Reading


What's Next

Save $1,000's when you sign up to Joomlashack's Everything Club.

You will get access to all our 32 extensions, and legendary support!

  Click here to join the Everything Club