Browse Source

feat: add MulterModule.register

pull/5444/head
Wing-Kam Wong 2 years ago
parent
commit
aa2d64520c
  1. 11
      packages/nocodb-nest/src/modules/public-datas/public-datas.module.ts

11
packages/nocodb-nest/src/modules/public-datas/public-datas.module.ts

@ -1,8 +1,19 @@
import multer from 'multer';
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { MulterModule } from '@nestjs/platform-express';
import { NC_ATTACHMENT_FIELD_SIZE } from '../../constants';
import { PublicDatasService } from './public-datas.service'; import { PublicDatasService } from './public-datas.service';
import { PublicDatasController } from './public-datas.controller'; import { PublicDatasController } from './public-datas.controller';
@Module({ @Module({
imports: [
MulterModule.register({
storage: multer.diskStorage({}),
limits: {
fileSize: NC_ATTACHMENT_FIELD_SIZE,
},
}),
],
controllers: [PublicDatasController], controllers: [PublicDatasController],
providers: [PublicDatasService], providers: [PublicDatasService],
}) })

Loading…
Cancel
Save