code: protected CmsUploadButton createUploadButtonForTarget(String target, boolean isRootPath) {
  
          CmsDialogUploadButtonHandler buttonHandler = new CmsDialogUploadButtonHandler(
  
              new Supplier<I_CmsUploadContext>() {
  
                  public I_CmsUploadContext get() {
  
                      return new I_CmsUploadContext() {
  
                          public void onUploadFinished(List<String> uploadedFiles) {
  
                              getTabHandler().updateIndex();
                          }
  
                      };
                  }
              });
  
          buttonHandler.setTargetFolder(target);
          buttonHandler.setIsTargetRootPath(isRootPath);
          CmsUploadButton uploadButton = new CmsUploadButton(buttonHandler);
          uploadButton.setText(null);
          uploadButton.setTitle(Messages.get().key(Messages.GUI_GALLERY_UPLOAD_TITLE_1, target));
          uploadButton.setButtonStyle(ButtonStyle.FONT_ICON, null);
          uploadButton.setImageClass(I_CmsButton.UPLOAD_SMALL);
          return uploadButton;
      }
docs: Creates an upload button for the given target.<p>
  
  @param target the upload target folder
  @param isRootPath true if target is a root path
  
  @return the upload button