diff --git a/api/apps/api/src/modules/geo-features/import/features-amounts-upload.service.ts b/api/apps/api/src/modules/geo-features/import/features-amounts-upload.service.ts index acc120f5dc..40aa65eaf6 100644 --- a/api/apps/api/src/modules/geo-features/import/features-amounts-upload.service.ts +++ b/api/apps/api/src/modules/geo-features/import/features-amounts-upload.service.ts @@ -72,7 +72,10 @@ export class FeatureAmountUploadService { projectId: string; userId: string; }): Promise | Right> { - await this.events.submittedEvent(data.projectId, data); + //Because feature CSV files are bound to be increasingly larger, this can cause problems when trying to save a big + //JSONB value into postgres eventually crashing due to an memory error, so the CSV file is ignored for the api event + const { fileBuffer, ...apiEventData } = data; + await this.events.submittedEvent(data.projectId, apiEventData); const apiQueryRunner = this.apiDataSource.createQueryRunner(); const geoQueryRunner = this.geoDataSource.createQueryRunner();