diff --git a/.env.sample b/.env.sample index ab264988d..cbcf1ca6f 100644 --- a/.env.sample +++ b/.env.sample @@ -152,4 +152,6 @@ ENABLE_CORS_IP_LIST="" # Provide a list of domains that are allowed to use this SCHEMA_FILE_SERVER_URL= // Please provide schema URL 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 +FILEUPLOAD_CACHE_TTL= //Provide file upload cache ttl + +FIELD_UPLOAD_SIZE= //Provide field upload size \ 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 f15c50157..ac0341ee9 100644 --- a/apps/api-gateway/src/issuance/issuance.controller.ts +++ b/apps/api-gateway/src/issuance/issuance.controller.ts @@ -401,8 +401,8 @@ async downloadBulkIssuanceCSVTemplate( required: true }) @UseInterceptors(FileInterceptor('file', { - limits: { fieldSize: 100 * 1024 * 1024 } - })) + limits: { fieldSize: Number(process.env.FIELD_UPLOAD_SIZE) || 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 80032547d..b2119288f 100644 --- a/apps/issuance/src/issuance.service.ts +++ b/apps/issuance/src/issuance.service.ts @@ -48,12 +48,12 @@ export class IssuanceService { private readonly commonService: CommonService, private readonly issuanceRepository: IssuanceRepository, private readonly userActivityRepository: UserActivityRepository, - @Inject(CACHE_MANAGER) private cacheManager: Cache, + @Inject(CACHE_MANAGER) private readonly cacheManager: Cache, private readonly outOfBandIssuance: OutOfBandIssuance, private readonly emailData: EmailDto, private readonly awsService: AwsService, - @InjectQueue('bulk-issuance') private bulkIssuanceQueue: Queue, - @Inject(CACHE_MANAGER) private cacheService: Cache + @InjectQueue('bulk-issuance') private readonly bulkIssuanceQueue: Queue, + @Inject(CACHE_MANAGER) private readonly cacheService: Cache ) { } async getIssuanceRecords(orgId: string): Promise {