user hook node update to attach files to a node?
The field data has already been committed by the time hook_node_update() is called, so you won't be able to make any persistent alterations to field data in there.

Instead you could use hook_node_presave(), which is run before any data is written to the backend.

function mymodule_node_presave($node) {
  // Build up file object

  // Then add it to the node.
  $node-&gt;field_files[$node-&gt;language][] = (array)$file;
}