import { AxiosRequestHeaders } from "axios"; /** * 第2版本的文件存储方案,文件的上传和下载走文件存储服务器,这样不影响当前nodejs服务的性能 */ export interface GenFileParams { fileId?: string; name?: string; w?: number; h?: number; fileBaseUrl?: string; hash?: string; } export interface GenZipFileParams { ids: string; names: string; zipFileName: string; } /** * 上传文件, 大于一定尺寸就分段上传 * @param files * @param params * @returns */ export declare const uploadSplitFile: (files: any[], params?: any, config?: AxiosRequestHeaders) => Promise; /** * 上传文件 * @param files * @param params * @returns */ export declare const uploadFile: (files: any[], params?: any, config?: AxiosRequestHeaders) => Promise; /** * 删除文件 */ export declare const delFile: (_id: string) => Promise>; /** * 查询文件列表,从本系统中获取 * @param params * @returns */ export declare const getEntityFiles: (params: Record) => Promise; /** * 生成压缩文件,并下载 * @param props */ export declare const genZipFile: (props: GenZipFileParams) => Promise; /** * 生成显示或下载文件的URL * @param param0 * @returns */ export declare const genFileUrl: (props: GenFileParams) => Promise<{ imgSrc: string; genZipUrl: string; downloadUrl: string; thumbnailUrl: string; }>; export declare const convertByFile: (file: File, toType: string) => Promise; /** * 转换文件格式 * @param file * @param toType * @param onSuccess * @param onError * @param onProgress */ export declare const changeFileType: (file: File, toType: string, onSuccess: (file: File) => void, onError?: ((err: any) => void) | undefined, onProgress?: ((loaded: number, total: number) => void) | undefined) => void; export declare const downloadFile: (downloadUrl: any, fileName: string) => void; export declare const downloadToFile: (downloadUrl: any) => Promise;