file.mime_type.guesser.extension

Same name in other branches
  1. 9 core/core.services.yml \file.mime_type.guesser.extension
  2. 8.9.x core/core.services.yml \file.mime_type.guesser.extension

Class

Drupal\Core\File\MimeType\ExtensionMimeTypeGuesser

Tags

  • mime_type_guesser
2 string references to file.mime_type.guesser.extension
FileMediaFormatterBase::isApplicable in core/modules/file/src/Plugin/Field/FieldFormatter/FileMediaFormatterBase.php
Returns if the formatter can be used for the provided field.
MimeTypeTest::testFileMimeTypeDetection in core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php
Tests mapping of mimetypes from filenames.

File

core/core.services.yml

View source
  1. class: Drupal\Core\File\MimeType\ExtensionMimeTypeGuesser
  2. arguments:
  3. - '@module_handler'
  4. tags:
  5. - { name: mime_type_guesser }
  6. lazy: true

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.