In 1.1 you could verify the mimetype of a file

What’s the process in 2.0. I couldn’t find out?


That seems to be extension name though? Rather than actual mimetype?

It looks like they have mimetypes in the ImageValidator. You can use that for images, but you may need to write your own validator for other types of files.

I think that to get mime-type is not trivial task.


It exists in Yii 1, as I use it to validate a .docx or .doc mime type. So I would think that it would be available in Yii 2.0