function 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
1 call to file_mimetype_mapping()
- DrupalLocalStreamWrapper::getMimeType in includes/
stream_wrappers.inc - Base implementation of getMimeType().
File
-
includes/
file.mimetypes.inc, line 18
Code
function file_mimetype_mapping() {
$mapping =& drupal_static(__FUNCTION__);
if (!isset($mapping)) {
$mapping = file_default_mimetype_mapping();
// Allow modules to alter the default mapping.
drupal_alter('file_mimetype_mapping', $mapping);
}
return $mapping;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.