docs: private void showUpload(CmsGallerySearchBean searchObj) {
  
          Set<String> targets = new HashSet<String>();
  
          if (searchObj.getGalleries() != null) {
              targets.addAll(searchObj.getGalleries());
          }
          if (searchObj.getFolders() != null) {
              targets.addAll(searchObj.getFolders());
          }
          if (m_createNewButton != null) {
              m_createNewButton.removeFromParent();
              m_createNewButton = null;
          }
          if (m_uploadButton == null) {
              m_uploadButton = createUploadButtonForTarget("", false);
              m_uploadButton.addStyleName(I_CmsLayoutBundle.INSTANCE.galleryDialogCss().resultTabUpload());
              m_tab.insert(m_uploadButton, 0);
          } else {
              m_uploadButton.getElement().getStyle().clearDisplay();
          }
          if (targets.size() == 1) {
              CmsGalleryFolderBean galleryFolder = getTabHandler().getGalleryInfo(targets.iterator().next());
              if ((galleryFolder != null)
                  && CmsEditExternalLinkDialog.LINK_GALLERY_RESOURCE_TYPE_NAME.equals(galleryFolder.getType())) {
                  m_createNewButton = createNewExternalLinkButton(targets.iterator().next());
                  if (m_createNewButton != null) {
                      m_createNewButton.addStyleName(I_CmsLayoutBundle.INSTANCE.galleryDialogCss().resultTabUpload());
                      m_tab.insert(m_createNewButton, 0);
                      if (CmsStringUtil.isEmptyOrWhitespaceOnly(searchObj.getNoUploadReason())) {
                          m_createNewButton.enable();
                      } else {
                          m_createNewButton.disable(searchObj.getNoUploadReason());
                      }
                  }
  
                  m_uploadButton.getElement().getStyle().setDisplay(Display.NONE);
              } else {
                  String uploadTarget = targets.iterator().next();
                  I_CmsUploadButtonHandler handler = m_uploadButton.getButtonHandler();
                  if (handler instanceof CmsDialogUploadButtonHandler) {
                      ((CmsDialogUploadButtonHandler)handler).setTargetFolder(uploadTarget);
                      // in case the upload target is a folder the root path is used
                      ((CmsDialogUploadButtonHandler)handler).setIsTargetRootPath(searchObj.getFolders().size() == 1);
                  }
                  if (CmsStringUtil.isEmptyOrWhitespaceOnly(searchObj.getNoUploadReason())) {
                      m_uploadButton.enable();
                      m_uploadButton.setTitle(Messages.get().key(Messages.GUI_GALLERY_UPLOAD_TITLE_1, uploadTarget));
                  } else {
                      m_uploadButton.disable(searchObj.getNoUploadReason());
                  }
              }
          } else {
              m_uploadButton.disable(Messages.get().key(Messages.GUI_GALLERY_UPLOAD_TARGET_UNSPECIFIC_0));
          }
  
      }