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