jDownloads Support Forum

jDownloads for Joomla 4.x and 5.x => jDownloads 4.0 => Suggestions - Feature Request => Topic started by: ghicar on 02.01.2024 20:59:45

Title: Configuring the root directory for uploading files in jDownloads
Post by: ghicar on 02.01.2024 20:59:45
This is a minor irritation on the excellent jDownloads package but thought I would ask anyway.  I see there is a mandatory configuration settings under options in the "Path Settings"  tab  with the label: "Upload directory path". The notes state that this must be the full path on the server.

I have a website with three environments live, test & dev, and I regularly take backups of Live into Test and/or Dev when I want to try something risky before implementing on Live.

This setting means I have to remember to go and edit this path in case I later attempt to upload files.  If you don't make this edit then uploads fail with HTTP 500  "Internal Server Error".

It would be good to have an option to specify this path relative to the JROOT so you don't need to remember to edit the setting when I take a fresh backup to dev/test.

BTW, Using jDownloads 4.0.38 on J!5.0.1 and PHP 8.2. All works fine for me, many thanks.
Title: Re: Configuring the root directory for uploading files in jDownloads
Post by: Arno on 03.01.2024 09:32:42
Hi,
In very old versions I had this setting with a relative path.
But at some point I had to change this, but I can't remember the reasons for this at the moment.
I would have to see if this option could be created as an alternative.  :-\
Title: Re: Configuring the root directory for uploading files in jDownloads
Post by: ghicar on 03.01.2024 18:28:49
Had a bit of a look around and made it marginally (arguably) better for my use case of copying live websites into lower environments.  I edited ~administrator/components/com_jdownloads/config.xml to make the "Upload directory path" parameter an optional field. This allowed you to empty the field and save the options. At first I thought this had done the trick but then realised that jdownloads processing of the form puts the correct default value in place when it is empty, so I would still need to edit the options to blank out the field and save whenever I copy the website somewhere else.  I did not think the benefit was worth moving away from the std 4.0.38 version, so I reverted the change I had made.