file_mimetype_mapping

Versions
7
file_mimetype_mapping()

Return an array of MIME extension mappings.

Returns the mapping after modules have altered the default mapping.

see file_get_mimetype()

Return value

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

Code

includes/file.mimetypes.inc, line 17

<?php
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;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.