From 316818275735788bf9e8cd124049f30484a1841e Mon Sep 17 00:00:00 2001 From: pallavicoder Date: Fri, 4 Oct 2024 19:49:09 +0530 Subject: [PATCH] hotfix:configuration-changes Signed-off-by: pallavicoder --- .env.sample | 4 +++- apps/api-gateway/src/issuance/issuance.controller.ts | 4 +++- apps/issuance/src/issuance.service.ts | 7 ++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.env.sample b/.env.sample index bee163529..ab264988d 100644 --- a/.env.sample +++ b/.env.sample @@ -150,4 +150,6 @@ KEYCLOAK_REALM=xxxxxxx ENABLE_CORS_IP_LIST="" # Provide a list of domains that are allowed to use this server SCHEMA_FILE_SERVER_URL= // Please provide schema URL -SCHEMA_FILE_SERVER_TOKEN=xxxxxxxx // Please provide schema file server token for polygon \ No newline at end of file +SCHEMA_FILE_SERVER_TOKEN=xxxxxxxx // Please provide schema file server token for polygon + +FILEUPLOAD_CACHE_TTL= //Provide file upload cache ttl \ No newline at end of file diff --git a/apps/api-gateway/src/issuance/issuance.controller.ts b/apps/api-gateway/src/issuance/issuance.controller.ts index f5d80615e..f15c50157 100644 --- a/apps/api-gateway/src/issuance/issuance.controller.ts +++ b/apps/api-gateway/src/issuance/issuance.controller.ts @@ -400,7 +400,9 @@ async downloadBulkIssuanceCSVTemplate( }, required: true }) - @UseInterceptors(FileInterceptor('file')) + @UseInterceptors(FileInterceptor('file', { + limits: { fieldSize: 100 * 1024 * 1024 } + })) async issueBulkCredentials( @Body() clientDetails: ClientDetails, diff --git a/apps/issuance/src/issuance.service.ts b/apps/issuance/src/issuance.service.ts index 39758c244..80032547d 100644 --- a/apps/issuance/src/issuance.service.ts +++ b/apps/issuance/src/issuance.service.ts @@ -1173,9 +1173,10 @@ async sendEmailForCredentialOffer(sendEmailCredentialOffer: SendEmailCredentialO credentialPayload.fileName = fileName; const newCacheKey = uuidv4(); - await this.cacheManager.set(requestId ? requestId : newCacheKey, JSON.stringify(credentialPayload), 60000); - -return newCacheKey; + const cacheTTL = Number(process.env.FILEUPLOAD_CACHE_TTL) || 60000; + await this.cacheManager.set(requestId || newCacheKey, JSON.stringify(credentialPayload), cacheTTL); + + return newCacheKey; } catch (error) { this.logger.error(`error in validating credentials : ${error.response}`);