1 file.mimetypes.inc file_mimetype_mapping()

Return an array of MIME extension mappings.

Returns the mapping after modules have altered the default mapping.

Return value

Array of mimetypes correlated to the extensions that relate to them.:

See also

file_get_mimetype()

File

core/includes/file.mimetypes.inc, line 18
Provides mimetype mappings.

Code

function file_mimetype_mapping() {
  $mapping = &backdrop_static(__FUNCTION__);
  if (!isset($mapping)) {
    $mapping = file_default_mimetype_mapping();
    // Allow modules to alter the default mapping.
    backdrop_alter('file_mimetype_mapping', $mapping);
  }
  return $mapping;
}