You can learn more about working with files here (link to files overview). The File MIME types helper contains useful functions when working specifically with MIME types.
Loading the Helper
$fh = Loader::helper(‘mime’);
$r = $fh->mimeFromExtension($extension)
Returns a MIME type given an extension
print $fh->mimeFromExtension(‘.jpg’); // outputs ‘image/jpeg’
$extension = $fh->mimeToExtension($mime)
Converts a known mime-type into its common file extension.