How to Add Google Drive Files to OSDownloads

It is possible to use OSDownloads to create a repository of downloadable Google documents. Instead of allowing people to simply visit your Google Drive documents, you can 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 file to your Google Drive account.
  2. Get your Google Drive file's ID.
  3. Create an OSDownloads file with this ID. 
  4. Create the file's front end menu item.
  5. Test the file download.

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

Once the file 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 with the file ID number you just copied at Google Drive. This is a placeholder file. It will present your Google Drive file for downloading to your Joomla site visitors.

Once you created an OSDownloads file for the file stored at your Google Drive, you need to 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 file downloading.

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

Step #1. Upload the required file to Google Drive.

  • 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 the required file from your hard drive to your Google Drive. For my tutorial, I've uploaded a PDF file of our bestselling book "Joomla 3 Explained".

joomla 3 explained uploaded

Excellent. At your Google Drive, you now have a file to offer for downloads via your Joomla site.

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

Step #2. Get the file's ID number

  • After the file upload is over, click on the name of the file:

click on the file name

  • You will see the file opened for reading. In the top right corner, click the More actions button:

click more actions

  • In the opened up menu, click Share:

click share

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

click get shareable link

  • You should see the URL resembling Copy the file ID between the /d and /view?. In my example URL, you would need to copy 14S59YJNyHumy0MXrwGyIqgsrQfowzE5R:

copy the part

  • In a text editor of your choice, create a new URL with the following steps:
    • Copy in the editor the following URL:<FILE_ID>.
    • Replace the <FILE_ID> part with the part you ust copied from the file's URL created by your Google Drive. Using my example, your new file URL should look like

Good job! You just created your downloadable file 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

  • Enter your file name into the Name field. For the purpose of this tutorial, I entered Joomla 3 Explained.
  • Paste the link you copied in the previous step into the File URL field:

enter the url in the file url field

  • Click Save & Close.

Excellent! At this point, your file is ready at your GooDrive. Your Joomla and OSDownloads are ready to offer this file to your 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 Download Joomla 3 Explained.
  • Click Select.

enter the 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:

create front end menu item

  • Click Save & Close.

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

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

final result

You will be prompted to download the file onto your hard drive. Congratulations! You now know how to add a Google Drive file in OSDownloads to make it downloadable to your Joomla site visitors.