fileupload_load

Versions
4.6 – 5
fileupload_load($node)

Implementation of hook_load().

The node is being loaded. Load the file's information from the database so it can be added to the node.

Code

developer/examples/fileupload.module, line 184

<?php
function fileupload_load($node) {
  $extras = new StdClass();
  $extras->file = db_fetch_object(db_query('SELECT filename, filepath, filemime, filesize FROM {fileupload} WHERE nid = %d', $node->nid));
  return $extras;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.