You are here

function filefield_paths_file_presave in File (Field) Paths 7

Same name and namespace in other branches
  1. 8 filefield_paths.module \filefield_paths_file_presave()

Implements hook_file_presave().

Parameters

$file:

File

./filefield_paths.module, line 367
Contains core functions for the File (Field) Paths module.

Code

function filefield_paths_file_presave($file) {

  // Store original filename in the database.
  if (empty($file->origname) && isset($file->filename)) {
    $file->origname = $file->filename;
  }
}