diff --git a/lib/types/Configuration.d.ts b/lib/types/Configuration.d.ts index 44e4b43..dbbc48d 100644 --- a/lib/types/Configuration.d.ts +++ b/lib/types/Configuration.d.ts @@ -35,7 +35,16 @@ export type ServerConfiguration = { }; internalExceptionMask?: string; koaBody?: { - maxFileSize?: number; + multipart?: boolean; + formidable?: { + maxFileSize?: number; + maxFields?: number; + maxFieldsSize?: number; + uploadDir?: string; + keepExtensions?: boolean; + hashAlgorithm?: string; + multiples?: boolean; + }; }; }; /** diff --git a/src/types/Configuration.ts b/src/types/Configuration.ts index d0f12c1..62ac952 100644 --- a/src/types/Configuration.ts +++ b/src/types/Configuration.ts @@ -37,7 +37,16 @@ export type ServerConfiguration = { }, internalExceptionMask?: string; koaBody?: { - maxFileSize?: number; + multipart?: boolean; //框架默认开启 用于处理multipart/form-data类型的请求,这种类型通常用于上传文件。 + formidable?: { + maxFileSize?: number; + maxFields?: number; + maxFieldsSize?: number; + uploadDir?: string; + keepExtensions?: boolean; + hashAlgorithm?: string; + multiples?: boolean; + } }; };