| 5 fileupload.module | 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.
File
- developer/
examples/ fileupload.module, line 192 - This is an example to demonstrate how to make a Drupal node support file uploads.
Code
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