1 file.module file_type_determine($fid)

File

core/modules/file/file.module, line 2644
Defines a "managed_file" Form API field and a "file" field for Field module.

Code

function file_type_determine($fid) {
  if ($file = file_load($fid)) {
    // The file type will be automatically determined when saving the file.
    file_save($file);
  }
}