I'm new to Drupal, and the regular newbie baggage applies... I'm a geek, but have only played with Drupal for a few weeks, please pardon my probably incorrect use of terms, etc.

I cannot force FileField Podcaster to recognize private files path (/system/files/) for the ENCLOSURE link; It seems to default to the system path, in my case: http://mikewren.com/sites/default/files/podcast/newbienet2008-05-18_0.mp3

I tried making files public, to no avail. I tried adding the following to settings.php without success:

$conf = array(
  'swftools_media_url' => 'http://mikewren.com/system/files/podcast', // No trailing slashes!
);

Also, the 1pixel player can't seem to see the local media files either, I'm not sure if it's related to the path issue also.

Here's an example URL: http://mikewren.com/node/97

With so many modules having dependancies, it's hard to track down where the issue is occurring, in FFPC, Views, Content Type, etc.

I'm out of ideas, and not sure how to proceed in my troubleshooting. Thanks for your efforts, I feel like I'm so close to the endzone here...

CommentFileSizeAuthor
#1 ffpc_private_files.patch.txt1.24 KBgrendzy
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

grendzy’s picture

Status: Active » Needs review
FileSize
1.24 KB

It's necessary to call file_create_url() in order to support sites with private filesystems.

A patch is attached.

mikewren’s picture

Status: Needs review » Reviewed & tested by the community

Fantastic, thank you so much! Swapped out those two lines and the Feed now lists the private filesystem URL as expected. I Hope these changes make it into the official release.

mfer’s picture

Assigned: Unassigned » mfer

This is on my plate to handle. I'm looking at fixing an issue with the guid for those coming from the audio module.

mfer’s picture

This has been committed to head. Please test and let me know if there are any issues.

mfer’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

mattman’s picture

Status: Closed (fixed) » Active

You also need to adjust the url for the enclosure tag as well.

starting at about line 85 in HEAD

Currently...

        $file_extra[] = array(
          'key' => 'enclosure',
          'attributes'  =>  array(
            'url'   => url( $file['filepath'], array('absolute'=>TRUE) ),
            'length'  => $file['filesize'],
            'type'    => $file['filemime'],
          ),
        );

should be...

        $file_extra[] = array(
          'key' => 'enclosure',
          'attributes'  =>  array(
            'url'   => file_create_url($file['filepath']),
            'length'  => $file['filesize'],
            'type'    => $file['filemime'],
          ),
        );

Enclosures offer the raw url when file system is set to private.

This will bypass any modules which use hook_file_download().

If the web server has been set to restrict access (which mine has) to the /files folder directly, then no files are transferred because of the bypass of file.inc's creation of the correct file url path.

mfer’s picture

Status: Active » Closed (duplicate)

This is a duplicate issue. I think this is the original issue to post it but I am not tracking it elsewhere. Thanks for posting to this issue and pointing it out. It should be fixed in the development branch in the next few days.