News:

Dear forum visitors, if the support forum is not available, please try again a few minutes later. Thanks!

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
  •