Viewing 2 replies - 1 through 2 (of 2 total)
  • Though the PDF isn’t displaying properly when one clicks the download link, it is actually being sent to the browser — I was able to save it locally. I then compared that PDF against the one that came attached to the email that was sent to me (which does display properly). The difference between the two is that the PDF from the download link contains 4 bytes at the start of the file that the other PDF does not have. Those 4 bytes are a carriage return, a newline (AKA a linefeed), a carriage return, and a newline. So, somehow your download.php script is sending two Windows-style blank lines – a CR/LF and another CR/LF. I don’t know where that is coming from. Perhaps you modified download.php and somehow got that in there? Or maybe some other WordPress plugin is somehow inserting those (maybe a debug plugin or something?). Or, perhaps some other completely unrelated process is somehow putting that in there (like a webserver filter maybe?), or maybe somehow you managed to get those characters into the filename itself and somehow those are getting into the file content when it’s transferred (not sure if that’s even possible). Or, maybe somehow there’s something weird about that file or that file’s name or configuration in Download Monitor?

    Hopefully that gives you enough info that you can figure out what the cause might be or where to look ….. if not, I suggest uploading a new file into Download Monitor. Make it a simple file like a .jpg file. Make the filename simple like “mytest.jpg” (no hyphens in the name). Once you get it into Download Monitor, look at the URL for the file (which is in the top-right corner of the details page for that file) and try that URL in a browser — that makes sure Download Monitor can find and download the file OK. If that works, then go ahead and change your EBD shortcode to use the download_id of that new file you just uploaded and then test and see if that works ok or not.

    post back here with results

    Thread Starter calebelliot

    (@calebelliot)

    Question. If I use direct link and use an absolute path to just one file(.pdf), what file do I edit to put the url(ex https://dev2.tjpoffice.com/wp-content/uploads/2017/resources/Business_Plan_Kernel_for_Veterans.pdf) after submitting the form? Just trying to do a work around while figuring out the problem with the carriage return.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Direct Link Not Working’ is closed to new replies.