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:
- Upload the required file to your Google Drive account.
- Get your Google Drive file's ID.
- Create an OSDownloads file with this ID.
- Create the file's front end menu item.
- 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:
- In the drop-down menu, 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".
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:
- You will see the file opened for reading. In the top right corner, click the More actions button:
- In the opened up menu, click Share:
- You should now see the Share with others box. Click Get shareable link:
- You should see the URL resembling
https://drive.google.com/file/d/18S59YGNyHomy0TXrwGyIqgsrQfowzE5K/view?usp=sharing
Copy the file ID between the/d
and/view?
. In my example URL, you would need to copy14S59YJNyHumy0MXrwGyIqgsrQfowzE5R
:
- In a text editor of your choice, create a new URL with the following steps:
- Copy in the editor the following URL:
https://drive.google.com/uc?export=download&id=<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
https://drive.google.com/uc?export=download&id=14S59YJNyHumy0MXrwGyIqgsrQfowzE5R
.
- Copy in the editor the following URL:
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:
- You will be taken to the OSDownloads Free: Files administrative page. 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:
- 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:
- Enter your menu item title into the Menu Title field. For my tutorial, I entered Download Joomla 3 Explained.
- Click Select.
You will see the Menu Item Type modal box.
- Click OSDownloads Free.
- Click Single File:
- In the menu item File field select the OSDownloads file you created in Step #3:
- 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:
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.