2 * Implements hook_file_load().
4 function {{ machine_name }}_file_load($files) {
5 // Add the upload specific data into the file object.
6 $result = db_query('SELECT * FROM {upload} u WHERE u.fid IN (:fids)', array(':fids' => array_keys($files)))->fetchAll(PDO::FETCH_ASSOC);
7 foreach ($result as $record) {
8 foreach ($record as $key => $value) {
9 $files[$record['fid']]->$key = $value;