hook_file_insert

  1. drupal
    1. 7
Versions
7 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

Code

drupal/modules/system/system.api.php, line 2597

<?php
function hook_file_insert($file) {

}
?>