You are here

README.txt in File MIME 6

Same filename and directory in other branches
  1. 8 README.txt
  2. 7 README.txt
Drupal determines the MIME type of each uploaded file by applying a MIME 
extension mapping to the file name.  The default mapping is hard-coded 
in the file_get_mimetype() function: 
http://api.drupal.org/api/function/file_get_mimetype

This module allows site administrators to replace the built-in mapping.  
For example, you may wish to serve FLAC files as audio/x-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:

text/html	html htm
text/plain	txt

After installing and enabling this module, the MIME extension mapping 
can be customized by visiting Administer > Site configuration > File 
MIME (admin/settings/filemime).

Once a custom mapping is configured, the built-in mapping will no longer 
be available, so all desired mappings must be explicitly set, either in 
the mime.types file or in the additional mappings text box.  You cannot 
simply append extra mappings to the built-in mapping.

Uninstalling this module will delete the mime_extension_mapping 
variable, thus restoring Drupal's built-in mapping.

File

README.txt
View source
  1. Drupal determines the MIME type of each uploaded file by applying a MIME
  2. extension mapping to the file name. The default mapping is hard-coded
  3. in the file_get_mimetype() function:
  4. http://api.drupal.org/api/function/file_get_mimetype
  5. This module allows site administrators to replace the built-in mapping.
  6. For example, you may wish to serve FLAC files as audio/x-flac rather
  7. than 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. text/html html htm
  13. text/plain txt
  14. After installing and enabling this module, the MIME extension mapping
  15. can be customized by visiting Administer > Site configuration > File
  16. MIME (admin/settings/filemime).
  17. Once a custom mapping is configured, the built-in mapping will no longer
  18. be available, so all desired mappings must be explicitly set, either in
  19. the mime.types file or in the additional mappings text box. You cannot
  20. simply append extra mappings to the built-in mapping.
  21. Uninstalling this module will delete the mime_extension_mapping
  22. variable, thus restoring Drupal's built-in mapping.