Class ResourceApi

附件资源相关 api

Hierarchy

  • ResourceApi

Constructors

Properties

ajax: Ajax

Methods

  • Creates a new resource TODO 目前大批量上传文件仍有问题 Creating a new resource is special because you also need to upload the file. Unlike other API calls, this one must have the "multipart/form-data" Content-Type. The file data must be passed to the "data" form field, and the other properties to the "props" form field. An example of a valid call with cURL would be: The "data" field is required, while the "props" one is not. If not specified, default values will be used.

    Parameters

    Returns Promise<ResourceProperties>

  • Parameters

    • id: string

    Returns Promise<Blob>

  • Gets the actual file associated with this resource.

    Parameters

    • id: string

    Returns Promise<Buffer>

  • TODO 这个 api 存在 bug

    Parameters

    • id: string

    Returns Promise<void>

Generated using TypeDoc