File::getMimeType()

string|null getMimeType()

Returns the mime type of the file.

The mime type is guessed using a MimeTypeGuesser instance, which uses finfo(), mimecontenttype() and the system binary "file" (in this order), depending on which of those are available.

Return Value

string|null The guessed mime type (e.g. "application/pdf")

See also

MimeTypeGuesser
doc_Symfony
2016-10-28 06:16:23
Comments
Leave a Comment

Please login to continue.