oak-general-business/lib/utils/cos/ctyun.d.ts

20 lines
1.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { EntityDict } from '../../oak-app-domain';
import { Cos } from "../../types/Cos";
import { OpSchema } from '../../oak-app-domain/ExtraFile/Schema';
import { CTYunCosConfig } from '../../types/Config';
export default class CTYun implements Cos<EntityDict> {
name: string;
autoInform(): boolean;
protected getConfig(application: Partial<EntityDict['application']['Schema']>): {
config: CTYunCosConfig;
account: import("../../types/Config").CTYunCloudConfig;
};
protected formKey(extraFile: Partial<OpSchema>): string;
upload(extraFile: OpSchema, uploadFn: (file: File | string, name: string, // 文件的part name
uploadUrl: string, // 上传的url
formData: Record<string, any>, // 上传的其它part参数
autoInform?: boolean, // 上传成功是否会自动通知server若不会则需要前台显式通知
getPercent?: Function) => Promise<any>, file: string | File, _uploadToAspect?: any, getPercent?: Function): Promise<void>;
composeFileUrl(application: Partial<EntityDict['application']['Schema']>, extraFile: Partial<EntityDict['extraFile']['OpSchema']>, style?: string): string;
}