From 219476182ad26a8776dc8eb08aec1ae2880dbfe4 Mon Sep 17 00:00:00 2001 From: Max Bischof <106820326+bischofmax@users.noreply.github.com> Date: Tue, 6 Feb 2024 19:38:39 +0100 Subject: [PATCH] BC-6488 - Add request timeout to upload controller (#4743) --- .../files-storage/controller/files-storage.controller.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/server/src/modules/files-storage/controller/files-storage.controller.ts b/apps/server/src/modules/files-storage/controller/files-storage.controller.ts index 8fc7bf17c60..45f856ccf1c 100644 --- a/apps/server/src/modules/files-storage/controller/files-storage.controller.ts +++ b/apps/server/src/modules/files-storage/controller/files-storage.controller.ts @@ -60,6 +60,7 @@ export class FilesStorageController { @ApiResponse({ status: 403, type: ForbiddenException }) @ApiResponse({ status: 500, type: InternalServerErrorException }) @Post('/upload-from-url/:schoolId/:parentType/:parentId') + @RequestTimeout(config().INCOMING_REQUEST_TIMEOUT) async uploadFromUrl( @Body() body: FileUrlParams, @Param() params: FileRecordParams, @@ -80,6 +81,7 @@ export class FilesStorageController { @ApiResponse({ status: 500, type: InternalServerErrorException }) @ApiConsumes('multipart/form-data') @Post('/upload/:schoolId/:parentType/:parentId') + @RequestTimeout(config().INCOMING_REQUEST_TIMEOUT) async upload( @Body() _: FileParams, @Param() params: FileRecordParams,