You are here

function mimetype_from_filename in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/guzzlehttp/psr7/src/functions.php \GuzzleHttp\Psr7\mimetype_from_filename()

Determines the mimetype of a file by looking at its extension.

Parameters

$filename:

Return value

null|string

1 call to mimetype_from_filename()
MultipartStream::createElement in vendor/guzzlehttp/psr7/src/MultipartStream.php

File

vendor/guzzlehttp/psr7/src/functions.php, line 594

Namespace

GuzzleHttp\Psr7

Code

function mimetype_from_filename($filename) {
  return mimetype_from_extension(pathinfo($filename, PATHINFO_EXTENSION));
}