Skip to content

Commit

Permalink
fix(CSV Upload): Ignores CSV file as part of the API Event data column
Browse files Browse the repository at this point in the history
  • Loading branch information
KevSanchez committed Apr 18, 2024
1 parent b021796 commit 1e6fda5
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ export class FeatureAmountUploadService {
projectId: string;
userId: string;
}): Promise<Left<any> | Right<GeoFeature[]>> {
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();
Expand Down

0 comments on commit 1e6fda5

Please sign in to comment.