///
import * as fnFn from 'fs';
import * as http from 'http';
export interface File {
readonly name: string;
readonly filename: string;
readonly size: number;
readonly mime: string;
readonly path: string;
getBuffer(): Promise;
getReadStream(options?: string | {
flags?: string;
encoding?: string;
fd?: number;
mode?: number;
autoClose?: boolean;
start?: number;
end?: number;
highWaterMark?: number;
}): fnFn.ReadStream | null;
destroy(): void;
getUrl(...p: any[]): Promise;
save(...p: any[]): Promise;
getPath(...p: any[]): Promise;
}
export interface saveFile {
(file: File, ...any: any[]): string | Promise;
}
export interface getUrl {
(f: string): string | Promise;
}
export interface getPath {
(f: string): string | Promise;
}
/**
* 获取请求文件
*/
export default function multipart(IncomingMessage: http.IncomingMessage, saveFile: saveFile, getUrl: getUrl, getPath: getPath): Promise<[object, File[]]>;