平台上传适配器的上传配置。

interface UploadConfig {
    url: string;
    headers?: Record<string, string>;
    source: UploadSource;
    fields?: Record<string, string>;
    timeoutMs?: number;
    signal?: AbortSignal;
    onProgress?: (progress: UploadProgress) => void;
}

Properties

url: string

上传 URL。

headers?: Record<string, string>

上传请求头。

source: UploadSource

待上传资源。

fields?: Record<string, string>

附加表单字段。

timeoutMs?: number

上传超时时间,单位毫秒。

signal?: AbortSignal

上传取消信号。

onProgress?: (progress: UploadProgress) => void

上传进度回调。