I have drupal 5.1 with fully working audio module installed.

As i said in the topic i wish to have audio nodes with direct links to files.
Like this:
"http://site/filez/audio/09 This Is Now.mp3"
instead of this:
"http://site/audio/download/4/09+This+Is+Now.mp3"

As i wish for the files to be transferred by http server not PHP and will implement user access there.

I already did try switching from privat to public in /admin/settings/file-system and reuploading but that didn't help. I guess links are hardcoded in audio module?

Any help on having direct links would be greatly appreciated.

Comments

hexa’s picture

I guess it is in audio.module.
I'm half way there... still need a function for decoding that strange file+name.mp3 url. Any hints on which is it?

    if (file_exists($file->filepath)) {
      // TODO: should these links be by vid?
      $ret['url_play'] = url('audio/play/'. $node->nid, NULL, NULL, TRUE);
      if ($ret['audio_fileinfo']['downloadable']) {
        // iTunes and other podcasting programs check the url to determine the
        // file type. we'll add the original file name on to the end. see issues
        // #35398 and #68716 for more info.
        $url = 'audio/download/'. $node->nid .'/'. $file->origname;

        //$url =  $file->filepath;  //<-- $url = uudecode($file->filepath); which function to use instead of fictional uudecode?


        $ret['url_download'] = url($url , NULL, NULL, TRUE);
      }
    }
hexa’s picture

Any ideas on which function to use for decoding this type of URL?

hexa’s picture

Bump, :-) please help, anyone?

bRight2’s picture

Did you find a way to get rid of the nid-number in the downloadlink? It would make my mp3-archive a little more private...