You are here

function filehash_file_validate in File Hash 8

Same name and namespace in other branches
  1. 7 filehash.module \filehash_file_validate()

Implements hook_file_validate().

File

./filehash.module, line 107
Generate hashes for each uploaded file.

Code

function filehash_file_validate(FileInterface $file) {
  return \Drupal::config('filehash.settings')
    ->get('dedupe') ? filehash_validate_dedupe($file) : [];
}