Forum Replies Created
-
AuthorPosts
-
tdaplynParticipant
When 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,
TimtdaplynParticipantHi,
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
TimtdaplynParticipantThanks – 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,
TimtdaplynParticipantHi. 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.
-
AuthorPosts