update add update
This commit is contained in:
@@ -26,8 +26,14 @@ export type Package = {
|
||||
};
|
||||
type Options = {
|
||||
check?: boolean;
|
||||
/**
|
||||
* 是否返回文本内容
|
||||
*/
|
||||
returnContent?: boolean;
|
||||
setToken?: boolean;
|
||||
/**
|
||||
* 本地文件hash
|
||||
*/
|
||||
hash?: string;
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
@@ -66,7 +66,7 @@ type UploadOptions = {
|
||||
* @param opts.meta meta
|
||||
* @returns
|
||||
*/
|
||||
export const upload = (opts: UploadOptions): Promise<{ code?: number; message?: string; [key: string]: any }> => {
|
||||
export const upload = (opts: UploadOptions): Promise<{ code?: number; message?: string;[key: string]: any }> => {
|
||||
const form = opts?.form || new FormData();
|
||||
if (!opts.form) {
|
||||
let hash = '';
|
||||
|
||||
Reference in New Issue
Block a user