code: private void checkFileType() {
  
          if ((m_fileInput != null) && (m_replaceInfo != null) && (m_fileWidget != null)) {
              CmsFileInfo file = m_fileInput.getFiles()[0];
              if (!m_replaceInfo.getSitepath().endsWith(file.getFileSuffix())) {
                  Widget warningImage = FontOpenCms.WARNING.getWidget(
                      20,
                      I_CmsConstantsBundle.INSTANCE.css().colorWarning());
                  warningImage.setTitle(Messages.get().key(Messages.GUI_REPLACE_WRONG_FILE_EXTENSION_0));
                  warningImage.addStyleName(
                      org.opencms.gwt.client.ui.css.I_CmsLayoutBundle.INSTANCE.listItemWidgetCss().permaVisible());
                  m_fileWidget.addButton(warningImage);
              }
          }
      }
docs: Checks if the file suffix of the selected file matches the suffix of the resource to replace.<p>