• 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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author mandsconsulting

    (@mandsconsulting)

    Hi ivsystem,

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

    Plugin Author mandsconsulting

    (@mandsconsulting)

    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.

    Thread Starter ivsystem

    (@ivsystem)

    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Email Before Download] download only works with full URL’ is closed to new replies.