You are here

README.txt in File MIME 8

Same filename and directory in other branches
  1. 6 README.txt
  2. 7 README.txt
FILE MIME MODULE
----------------

Drupal determines the MIME type of each uploaded file by applying a MIME 
type mapping to the file name.  The default mapping is hard-coded in the 
ExtensionMimeTypeGuesser class:
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21File%21MimeType%21ExtensionMimeTypeGuesser.php/property/ExtensionMimeTypeGuesser%3A%3AdefaultMapping/8

This module allows site administrators to alter the built-in mapping.  
For example, you may wish to serve FLAC files as audio/flac rather than 
application/x-flac.

Custom mappings can be extracted from the server's mime.types file 
(often available on a path such as /etc/mime.types) and/or a 
site-specific mapping string, both of which must use the standard syntax 
for mime.types files.  For example:

audio/mpeg					mpga mpega mp2 mp3 m4a
audio/mpegurl					m3u
audio/ogg					oga ogg opus spx

After installing and enabling this module, the MIME type mapping can be 
configured by visiting Administration > Configuration > Media > File 
MIME (admin/config/media/filemime). Use the Apply tab 
(admin/config/media/filemime/apply) to apply the configured MIME type 
mapping retroactively to all previously uploaded files.

Disabling this module will restore Drupal's built-in MIME type mapping.

File

README.txt
View source
  1. FILE MIME MODULE
  2. ----------------
  3. Drupal determines the MIME type of each uploaded file by applying a MIME
  4. type mapping to the file name. The default mapping is hard-coded in the
  5. ExtensionMimeTypeGuesser class:
  6. https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21File%21MimeType%21ExtensionMimeTypeGuesser.php/property/ExtensionMimeTypeGuesser%3A%3AdefaultMapping/8
  7. This module allows site administrators to alter the built-in mapping.
  8. For example, you may wish to serve FLAC files as audio/flac rather than
  9. application/x-flac.
  10. Custom mappings can be extracted from the server's mime.types file
  11. (often available on a path such as /etc/mime.types) and/or a
  12. site-specific mapping string, both of which must use the standard syntax
  13. for mime.types files. For example:
  14. audio/mpeg mpga mpega mp2 mp3 m4a
  15. audio/mpegurl m3u
  16. audio/ogg oga ogg opus spx
  17. After installing and enabling this module, the MIME type mapping can be
  18. configured by visiting Administration > Configuration > Media > File
  19. MIME (admin/config/media/filemime). Use the Apply tab
  20. (admin/config/media/filemime/apply) to apply the configured MIME type
  21. mapping retroactively to all previously uploaded files.
  22. Disabling this module will restore Drupal's built-in MIME type mapping.