We're using flexinode. I created a flexinode type 'attached' and set the the the node theme to open the attached document if one was present.
It's not perfect - * if there is more than one attached file, it only opens the first one * search doesn't index the document (yet)
But flexinode would let you use all kinds of metadata. I'm not sure what the deal is with the flexinode and CCK modules and whether this will last.
<?phpforeach ($files as $file){ header("Content-size: $file->filesize"); header("Content-type: $file->filemime"); readfile("/my dir/" . base_path() . $file->filepath); exit;}?><h3>Warning: no file attached to this node</h3>
More information about formatting options
February 27, 2009, Darien Public Library, Darien, CT
Read more
We're using flexinode. I
We're using flexinode. I created a flexinode type 'attached' and set the the the node theme to open the attached document if one was present.
It's not perfect -
* if there is more than one attached file, it only opens the first one
* search doesn't index the document (yet)
But flexinode would let you use all kinds of metadata. I'm not sure what the deal is with the flexinode and CCK modules and whether this will last.
<?php
foreach ($files as $file)
{
header("Content-size: $file->filesize");
header("Content-type: $file->filemime");
readfile("/my dir/" . base_path() . $file->filepath);
exit;
}
?>
<h3>Warning: no file attached to this node</h3>