DiskNode (http://drupal.org/node/43600) and maybe even File Browser (http://drupal.org/project/filebrowser) sound like what you want as far as functionality goes, but they use a filesystem, not a database. Is the database you are using a standard relational database or some other type?
I learned today that my "neat use of headers" broke direct links (without referring URLs) to attachment-nodes in IE6. Have I really not used IE6 in the 6 months since I posted that? Ugh.
I am noticing that my solution doesn't work with "taxonomy views", where Drupal tries to display all nodes from a taxonomy term. Sending headers, a document and exiting breaks the view.
I use taxonomy mostly for theming public vs. intranet content, but having recently discovered views, I'm adding on, so I'll work on this.
I think I can escape the headers if there's a $view happening and send a teaser/description instead.
DiskNode and File Browser
DiskNode (http://drupal.org/node/43600) and maybe even File Browser (http://drupal.org/project/filebrowser) sound like what you want as far as functionality goes, but they use a filesystem, not a database. Is the database you are using a standard relational database or some other type?
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>
Neat use of headers
Neat use of headers. Check out http://interoperating.info/mark/node/65 for searching attachments.
I learned today that my
I learned today that my "neat use of headers" broke direct links (without referring URLs) to attachment-nodes in IE6. Have I really not used IE6 in the 6 months since I posted that? Ugh.
breaks
I am noticing that my solution doesn't work with "taxonomy views", where Drupal tries to display all nodes from a taxonomy term. Sending headers, a document and exiting breaks the view.
I use taxonomy mostly for theming public vs. intranet content, but having recently discovered views, I'm adding on, so I'll work on this.
I think I can escape the headers if there's a $view happening and send a teaser/description instead.
There is no I think
I search something like that but never found this kind of module.
Post new comment