Interface UploadAgent

All Superinterfaces:
Agent, OperationAgent

public interface UploadAgent extends OperationAgent
The agent for files uploading operation. Supported components with upload property such as Button, Menuitem and Toolbarbutton. DesktopAgent can be UploadAgent for specific case such as uploading by Fileupload.get(). Notice that you should use the same instance in one uploading iteration.
Since:
1.1.0
Author:
pao
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Invoke this method when uploading finished.
    void
    upload(File file, String contentType)
    Upload a file to ZK web application.
    void
    upload(String fileName, InputStream content, String contentType)
    Upload a file from input stream to ZK web application.

    Methods inherited from interface org.zkoss.zats.mimic.Agent

    getClient, getDelegatee
  • Method Details

    • upload

      void upload(String fileName, InputStream content, String contentType)
      Upload a file from input stream to ZK web application. The input stream won't be closed, it should be closed manually.
      Parameters:
      fileName - specify name for uploading file, should not be null.
      content - content of uploaded file, should not be null.
      contentType - specify type of content. If null, indicate it is binary form.
      See Also:
    • upload

      void upload(File file, String contentType)
      Upload a file to ZK web application.
      Parameters:
      file - file for uploading, should not be null.
      contentType - specify type of content. If null, indicate it is binary form.
      See Also:
    • finish

      void finish()
      Invoke this method when uploading finished.