You are here

README.txt in File MIME 7

Same filename and directory in other branches
  1. 8 README.txt
  2. 6 README.txt
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 
file_default_mimetype_mapping() function:
http://api.drupal.org/api/drupal/includes--file.mimetypes.inc/function/file_default_mimetype_mapping/7

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