diff --git a/core/includes/file.inc b/core/includes/file.inc index 034a997459d..79914af51c9 100644 --- a/core/includes/file.inc +++ b/core/includes/file.inc @@ -1110,32 +1110,6 @@ function file_upload_max_size() { return $max_size; } -/** - * Determines an Internet Media Type or MIME type from a filename. - * - * @param $uri - * A string containing the URI, path, or filename. - * @param $mapping - * An optional map of extensions to their mimetypes, in the form: - * - 'mimetypes': a list of mimetypes, keyed by an identifier, - * - 'extensions': the mapping itself, an associative array in which the key - * is the extension (lowercase) and the value is the mimetype identifier. - * - * @return - * The internet media type registered for the extension or - * application/octet-stream for unknown extensions. - * - * @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0. Calls are - * passed on to a new file.mime_type.guesser service, and the $mapping - * parameter is ignored. Use - * \Drupal::service('file.mime_type.guesser')->guess($uri). - * - * @see \Drupal\Core\File\MimeType\ExtensionMimeTypeGuesser::guess() - */ -function file_get_mimetype($uri, $mapping = NULL) { - return \Drupal::service('file.mime_type.guesser')->guess($uri); -} - /** * Sets the permissions on a file or directory. *