WordPress Download Monitor Plugin › Forums › Download Monitor Plugin Forum › Hidden Downloads – file_exists error on all settings
- This topic has 9 replies, 3 voices, and was last updated 5 years, 1 month ago by admin.
-
AuthorPosts
-
July 14, 2019 at 9:47 pm #1278tdaplynParticipant
Hi,
sdm_download tag works fine but when I use sdm_hidden_download I get file_exists(‘/wp-content…’) errors regardless of what config settings I try.
Bought and downloaded today.
Please advise.
Thanks.
July 16, 2019 at 4:27 am #1282adminKeymasterJust to confirm, is the file uploaded to your website or are you using a file from an external server/site?
July 17, 2019 at 12:33 pm #1283tdaplynParticipantHi. Thanks for getting back to me.
The file is uploaded to the media library on the wordpress install (local).
The full error is:
Error on file_exists(‘/wp-content/uploads/2019/07/[filename].pdf’)
This is the correct path to the file (if I append it to my root domain it downloads fine).
For the Automatic URL Conversion Preference setting I have tried all 3 options – Absolute, Relative and Do not convert, but the result is exactly the same error message.
July 18, 2019 at 4:12 am #1285chanelParticipantWe’d like to take a further look at this for you. Can you please use the contact form to get in touch with the support team.
July 24, 2019 at 8:13 am #1286adminKeymasterLooks like you were using a relative URL value in the download URL field (that is not correct). You need to use the FULL URL of the download item in our plugin’s configuration.
July 24, 2019 at 2:49 pm #1287tdaplynParticipantThanks – I can confirm that’s now working!
Is there any way I can use variables like {PROTOCOL} and {HOST} or similar to have the plugin look at the request URL and fill-in the detail? Or better still have the plugin just accept root-based relative paths (starting with ‘/’) and prepend the protocol and host as needed at runtime?
It’s generally considered bad form to hard-code full paths to on-server resources as it will cause lots of broken functionality should the site move to a new domain or http/https access change.
Thanks,
TimJuly 25, 2019 at 1:02 am #1289adminKeymasterYes, you can use Absolute path of the download when using the hidden downloads addon. That will work fine too.
October 12, 2019 at 7:24 pm #1351tdaplynParticipantHi,
That’s not quite what I meant. What I was saying it that it should accept relative URLs really, in case the site gets moved to a different domain etc.
Thanks for your help
TimOctober 12, 2019 at 7:29 pm #1353tdaplynParticipantWhen you use the Select File button to choose a file from the media library, it always inserts a relative URL, not an absolute one.
Does it really make sense that we have to manually add ‘https://mysite.com/’ in front every time?
Thanks,
TimOctober 14, 2019 at 7:09 am #1355adminKeymasterNo, it is not supposed to insert a relative URL. That is likely a configuration issue in your WP install somewhere. By default, the media library is supposed to insert the full URL of the file.
In the media inserter, do you see a button called “Select File URL” or something like that? What version of WordPress are you using?
-
AuthorPosts
- You must be logged in to reply to this topic.