def _file_type(self, field):
type = mimetypes.guess_type(self._files[field])[<NUM_LIT:0>]<EOL>return type.encode("<STR_LIT:utf-8>") if isinstance(type, unicode) else str(type)<EOL>
Returns file type for given file field.

        Args:
            field (str): File field

        Returns:
            string. File type