News:

Support for jDownloads 3 has been ended
Since 17 August 2023 Joomla.org has discontinued support for Joomla 3.x. Therefore, we will no longer offer official support for our Joomla 3 jDownloads version 3.9.x from January 2024.
Please update your website to the latest Joomla version (Joomla 4 or Joomla 5) as soon as possible. Afterwards, please update jDownloads to the latest published version. The longer you delay, the more difficult the upgrade process for your website is likely to be.

Main Menu
Support-Forum

Direct downloads links

Started by Akasha, 07.12.2017 12:33:25

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Akasha

We are attempting to provide direct links (e.g www.site.com/jdownloads/file.rar) as opposed to the Joomla SEF links to allow us to cache the files with a reverse proxy. All of the threads that have been posted about this are years old now and the code changes don't work anymore.

Is this possible and if so does it require modification of Jdownloads? Appreciate any assistance.
  •  

Akasha

  •  

ColinM

Hi
There is no standard way to to have a direct link to the downloadable file itself. There are issues about Joomla! permissions and view Access to be considered so modifying the code would, I suspect, be a "challenge".
You basically want to generate someting like below
<a target="_blank" href="https://www.your-site.com/topLevelDir/nextLevelDir/.../filemame.ext">filename</a>
where the ... represents the rest of the directories.

This would mean modifying file <yoursite>\components\com_jdownloads\views\downloads\tmpl\default.php to expand the category chain and getting the filename part by using the CatID and FileID to make relevant equiries from the database.

This is not something for the faint hearted.  Also you would need to preserve the code over updates as well. Getting it wrong could prove 'interesting'.
Colin
Colin M
  •