Skip navigation
Help

hook_file_insert

7 system.api.php hook_file_insert($file)

Respond to a file being added.

This hook is called before a file has been added to the database. The hook doesn't distinguish between files created as a result of a copy or those created by an upload.

Parameters

$file: The file that is about to be saved.

See also

file_save()

Related topics

2 functions implement hook_file_insert()

1 invocation of hook_file_insert()

File

drupal/modules/system/system.api.php, line 2614
Hooks provided by Drupal core and the System module.

Code

function hook_file_insert($file) {

}