diff --git a/packages/nocodb-nest/src/modules/attachments/attachments.controller.ts b/packages/nocodb-nest/src/modules/attachments/attachments.controller.ts index 4774a6ef8a..e2653c2be6 100644 --- a/packages/nocodb-nest/src/modules/attachments/attachments.controller.ts +++ b/packages/nocodb-nest/src/modules/attachments/attachments.controller.ts @@ -48,9 +48,6 @@ export class AttachmentsController { UploadAllowedInterceptor, AnyFilesInterceptor({ storage: multer.diskStorage({}), - // limits: { - // fieldSize: NC_ATTACHMENT_FIELD_SIZE, - // }, limits: { fileSize: NC_ATTACHMENT_FIELD_SIZE, }, diff --git a/packages/nocodb-nest/src/modules/public-datas/public-datas.controller.ts b/packages/nocodb-nest/src/modules/public-datas/public-datas.controller.ts index 8bd46903f4..8c5292dedb 100644 --- a/packages/nocodb-nest/src/modules/public-datas/public-datas.controller.ts +++ b/packages/nocodb-nest/src/modules/public-datas/public-datas.controller.ts @@ -1,4 +1,16 @@ -import { Controller, Get, HttpCode, Param, Post, Request } from '@nestjs/common' +import { + Controller, + Get, + HttpCode, + Param, + Post, + Request, + UseInterceptors, +} from '@nestjs/common'; +import { AnyFilesInterceptor } from '@nestjs/platform-express'; +import multer from 'multer'; +import { NC_ATTACHMENT_FIELD_SIZE } from '../../constants'; +import { UploadAllowedInterceptor } from '../../interceptors/is-upload-allowed/is-upload-allowed.interceptor'; import { PublicDatasService } from './public-datas.service'; @Controller() @@ -47,6 +59,15 @@ export class PublicDatasController { // ); @Post('/api/v1/db/public/shared-view/:sharedViewUuid/rows') @HttpCode(200) + @UseInterceptors( + UploadAllowedInterceptor, + AnyFilesInterceptor({ + storage: multer.diskStorage({}), + limits: { + fileSize: NC_ATTACHMENT_FIELD_SIZE, + }, + }), + ) async dataInsert( @Request() req, @Param('sharedViewUuid') sharedViewUuid: string,