Menu

File Upload

Help
Sat
2005-07-11
2013-04-29
  • Sat

    Sat - 2005-07-11

    I have another problem here....
    Our webspace provider made it so that directories in the main web dir are subdomains. so, I made a "tracker" dir, meaning that both "domain.com/tracker" and "tracker.domain.com" works. But, I dont know how to set up the upload dir.

    When I choose it correctly, it chooses the url wrong.
    eg. when I say the torrent folder is "tracker/torrents", it uploads the torrent correctly, but the url it adds is "tracker.domain.com/tracker/torrents/torrent.torrent"
    (Should be "tracker.domain.com/torrents/torrent.torrent")

    Obviously, the second "/tracker/" is wrong.
    For now I have to write the url manually, but I just wanted to know if there is a solution to this...

     
    • Dan

      Dan - 2005-07-12

      Yes, the URL is built according to what the server says it's URL is. But this can be fixed relatively easily if you want to edit the bta_add.php script. MAKE A BACKUP OF THE bta_add.php SCRIPT FIRST in case it doesn't work.

      Look for this line:

      $url = "http://" . $_SERVER["HTTP_HOST"] . "/" . $GLOBALS["torrent_folder"] . "/" . $copyFilename;

      and change it to:

      $url = "http://tracker.domain.com/torrents/" . $copyFilename;

      That should fix it.

       
    • Dan

      Dan - 2005-07-12

      IGNORE that post. I had a typo in it!

      Use this message instead:

      Yes, the URL is built according to what the server says it's URL is. But this can be fixed relatively easily if you want to edit the bta_add.php script. MAKE A BACKUP OF THE bta_add.php SCRIPT FIRST in case it doesn't work.

      Look for this line:

      $url = "http://"; . $_SERVER["HTTP_HOST"] . "/" . $GLOBALS["torrent_folder"] . "/" . $copyFilename;

      and change it to:

      $url = "http://tracker.domain.com/torrents/" . $copyFilename;

      That should fix it.

       
    • Dan

      Dan - 2005-07-12

      Weird, it is adding a semicolon where there shouldn't be one.

      In the corrected line there should only be 1 semicolon at the end of the line, make sure when you paste the one after the URL is removed.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.