diff --git a/packages/nocodb/src/controllers/attachments-secure.controller.ts b/packages/nocodb/src/controllers/attachments-secure.controller.ts index 1aec7f2803..997e775663 100644 --- a/packages/nocodb/src/controllers/attachments-secure.controller.ts +++ b/packages/nocodb/src/controllers/attachments-secure.controller.ts @@ -47,7 +47,7 @@ export class AttachmentsSecureController { @UseInterceptors(UploadAllowedInterceptor, AnyFilesInterceptor()) async upload( @UploadedFiles() files: Array, - @Query('scope') scope?: PublicAttachmentScope, + @Query('scope') scope: PublicAttachmentScope, @Req() req: NcRequest & { user: { id: string } }, ) { const attachments = await this.attachmentsService.upload({ @@ -65,7 +65,7 @@ export class AttachmentsSecureController { @UseGuards(MetaApiLimiterGuard, GlobalGuard) async uploadViaURL( @Body() body: Array, - @Query('scope') scope?: PublicAttachmentScope, + @Query('scope') scope: PublicAttachmentScope, @Req() req: NcRequest & { user: { id: string } }, ) { const attachments = await this.attachmentsService.uploadViaURL({ diff --git a/packages/nocodb/src/controllers/attachments.controller.ts b/packages/nocodb/src/controllers/attachments.controller.ts index 96aefe533d..6ddc67e1cb 100644 --- a/packages/nocodb/src/controllers/attachments.controller.ts +++ b/packages/nocodb/src/controllers/attachments.controller.ts @@ -48,7 +48,7 @@ export class AttachmentsController { @UseInterceptors(UploadAllowedInterceptor, AnyFilesInterceptor()) async upload( @UploadedFiles() files: Array, - @Query('scope') scope?: PublicAttachmentScope, + @Query('scope') scope: PublicAttachmentScope, @Req() req: NcRequest, ) { const attachments = await this.attachmentsService.upload({ @@ -68,7 +68,7 @@ export class AttachmentsController { async uploadViaURL( @Body() body: Array, @Query('path') path: string, - @Query('scope') scope?: PublicAttachmentScope, + @Query('scope') scope: PublicAttachmentScope, @Req() req: NcRequest, ) { const attachments = await this.attachmentsService.uploadViaURL({