完成第一阶段

main
expressgy 1 year ago
parent db92a88671
commit cfc1e90ffc
  1. 3
      src/main.ts

@ -4,6 +4,7 @@ import {
FastifyAdapter, FastifyAdapter,
NestFastifyApplication, NestFastifyApplication,
} from '@nestjs/platform-fastify'; } from '@nestjs/platform-fastify';
// 参数验证 // 参数验证
import { ValidationPipe } from '@nestjs/common'; import { ValidationPipe } from '@nestjs/common';
// Fastify文件上传插件 // Fastify文件上传插件
@ -47,7 +48,7 @@ async function bootstrap() {
}), }),
); // 开启参数转换,就不用一个一个写了 ); // 开启参数转换,就不用一个一个写了
// fastify文件上传中间件 // fastify文件上传中间件
await app.register(fastifyMultipart, { await app.register(fastifyMultipart as any, {
addToBody: true, addToBody: true,
throwFileSizeLimit: true, throwFileSizeLimit: true,
limits: { limits: {

Loading…
Cancel
Save