WordPress.org

Ready to get started?Download WordPress

Forums

Email Before Download
download only works with full URL (4 posts)

  1. ivsystem
    Member
    Posted 2 years ago #

    Email-before-download only works when you enter the full URL to the file in Download Monitor. I'd like to use relative URLs though, but then email-before-download takes the files from the wrong place. This could easily be solved if in download.php you check whether the URL starts with http and if not, feed it through the site_url function to get a complete URL.

  2. mandsconsulting
    Member
    Plugin Author

    Posted 2 years ago #

    Hi ivsystem,

    Thanks for the note. We will look into supporting relative paths in a coming release.

  3. mandsconsulting
    Member
    Plugin Author

    Posted 2 years ago #

    Hi ivsystem,

    Can you show me some documentation on the Download Monitor that states where relative paths are supported or how they suggest to users they be entered? I want to make sure we understand the use case and how we are integrating with Download Monitor.

    AS opposed to your relative URL request, it seems other users have been asking us why their full paths -- starting from their server's root directory -- doesn't work and not sure why they do that rather than just referencing the URL. Need to see if Download Monitor folks or docs are asking people to do it that way so we can decide how/if we will support this.

  4. ivsystem
    Member
    Posted 2 years ago #

    Hi,

    I'm afraid I don't have that kind of information. All I know is from my own experience.

    What I do know is that both Download Monitor and Email Before Download work perfectly when a full path is provided, including protocol and domain name. Download Monitor does not always work when protocol and domain name are omitted. This is because the given path is both used as a URL and as a file path. If you start this path with a / (because you want to be sure to start in the root folder), the URL part works fine, but the file path part does not. Because of the /, the system is trying to load the file from the root of the current drive. It's highly unlikely that your file can be found off the root of the current drive. The solution I use and that works for me, is omitting the starting /. I cannot guarantee this works for everyone though.

    Even without the starting / in the path, Email Before Download does not work correctly. I found out that this is caused by the sending of the Location header. If I add the domain to the path, using the site_url function, it again works as expected.

    BTW. The reason I don't use a full URL is that my site runs on several domains. I want each download to come from the referencing domain, not from one fixed domain.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic