/** * 附件上传协议:普通文件(带断点续传与合并校验)与视频(分块后确认)。 * 两套协议的端点、参数大小写、进度算法与收尾都不同,各自照原样实现,不合并成带开关的一套。 * * @author nokecy */ import { type AttachmentEnv } from './env'; /** 分块大小,同时也是切块上传的阈值。 */ export declare const CHUNK_SIZE: number; type Progress = (event: any) => void; /** 把文件切成 `chunks` 块。 */ export declare const splitFile: (file: Blob, eachSize: number, chunks: number) => Promise; /** 普通文件协议。 */ export declare const createFileProtocol: (env: AttachmentEnv) => { uploadSingle: (file: any, onProgress: Progress) => Promise<{ nextchunk: any; filename: any; }>; uploadChunked: (file: any, onProgress: Progress) => Promise; }; /** 视频协议。 */ export declare const createVideoProtocol: (env: AttachmentEnv) => { uploadSingle: (file: any, onProgress: Progress) => Promise; uploadChunked: (file: any, onProgress: Progress) => Promise; }; export {};