• Resolved shadowq

    (@shadowq)


    When the download button is clicked, I’m getting a file that is 0 bytes in length. Playing it in browser works fine. I’ve tried the download button on other browsers too.
    Any suggestions? ??

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter shadowq

    (@shadowq)

    I’ve fixed this, in case this helps someone else.
    My MP3 URLs being filtered with relative, not absolute (didn’t include the domain). If lines 89-90 in map_download.php weren’t commented out, the error would have been easier to spot (“File doesn’t exist”).

    I just added a check to see if the URL requested was relative, if so- then add the relevant prefix.

    After line 29:
    if(substr($file_url,0,1) == “/”) $file_url = (($_SERVER[‘HTTPS’] == ‘on’ || $_SERVER[‘HTTPS’] == 1) || isset($_SERVER[‘HTTP_X_FORWARDED_PROTO’]) && $_SERVER[‘HTTP_X_FORWARDED_PROTO’] == ‘https’ ? “https://” : “https://”) . $_SERVER[‘HTTP_HOST’] . ” . $file_url;

Viewing 1 replies (of 1 total)
  • The topic ‘Downloading MP3- 0 bytes’ is closed to new replies.