code: private void openUploadWithFiles(JavaScriptObject files) {
  
          JsArray<CmsFileInfo> cmsFiles = files.cast();
          List<CmsFileInfo> fileObjects = new ArrayList<CmsFileInfo>();
          for (int i = 0; i < cmsFiles.length(); ++i) {
              fileObjects.add(cmsFiles.get(i));
          }
          CmsDialogUploadButtonHandler buttonHandler = new CmsDialogUploadButtonHandler(
              new Supplier<I_CmsUploadContext>() {
  
                  /**
                   * @see com.google.common.base.Supplier#get()
                   */
                  public I_CmsUploadContext get() {
  
                      return new I_CmsUploadContext() {
  
                          public void onUploadFinished(List<String> uploadedFiles) {
  
                              uploadFinished(uploadedFiles);
                          }
  
                      };
                  }
              });
          buttonHandler.setIsTargetRootPath(true);
          buttonHandler.setTargetFolder(getState().getTargetFolderRootPath());
          buttonHandler.openDialogWithFiles(fileObjects);
      }
docs: Opens the upload dialog with the given file references to upload.<p>
  
  @param files the file references