Symfony\Component\HttpFoundation\File\File::getMimeType
Returns the mime type of the file.
The mime type is guessed using a MimeTypeGuesser instance, which uses finfo(), mime_content_type() and the system binary "file" (in this order), depending on which of those are available.
Signature
public function getMimeType()
Returns
- string|null
- The guessed mime type (i.e. "application/pdf")