code: private void checkSelection() {
  
          m_okButton.disable(Messages.get().key(Messages.GUI_UPLOAD_BUTTON_OK_DISABLE_CHECKING_0));
  
          if (!m_selectionDone) {
              m_firstContentHeight = CmsDomUtil.getCurrentStyleInt(m_scrollPanel.getElement(), CmsDomUtil.Style.height);
              m_firstInfoHeight = m_dialogInfo.getOffsetHeight();
              m_firstSummaryHeight = m_selectionSummary.getOffsetHeight();
          }
  
          CmsRpcAction<CmsUploadFileBean> callback = new CmsRpcAction<CmsUploadFileBean>() {
  
              /**
               * @see org.opencms.gwt.client.rpc.CmsRpcAction#execute()
               */
              @Override
              public void execute() {
  
                  List<String> filesToCheck = new ArrayList<String>(getFilesToUpload().keySet());
                  filesToCheck.removeAll(getFilesToUnzip(false));
                  getUploadService().checkUploadFiles(filesToCheck, getTargetFolder(), m_isTargetRootPath, this);
              }
  
              /**
               * @see org.opencms.gwt.client.rpc.CmsRpcAction#onResponse(java.lang.Object)
               */
              @Override
              protected void onResponse(CmsUploadFileBean result) {
  
                  proceedWorkflow(result);
              }
          };
          callback.execute();
      }
docs: Before the upload data is effectively submited we have to check
  for already existent resources in the VFS.<p>
  
  Executes the RPC call that checks the VFS for existing resources.
  Passes the response object to a method that evaluates the result.<p>