From 727a452ab4173003cb17d15e45f417fa4573367c Mon Sep 17 00:00:00 2001 From: Henry Fontanier Date: Mon, 22 Jan 2024 10:42:16 +0100 Subject: [PATCH] enh: increase max number of CSV rows (#3354) * enh: increase max number of CSV rows * allow bigger files --------- Co-authored-by: Henry Fontanier --- front/pages/api/w/[wId]/data_sources/[name]/tables/csv.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/front/pages/api/w/[wId]/data_sources/[name]/tables/csv.ts b/front/pages/api/w/[wId]/data_sources/[name]/tables/csv.ts index 8b353ccde9c1..ba6543b0094e 100644 --- a/front/pages/api/w/[wId]/data_sources/[name]/tables/csv.ts +++ b/front/pages/api/w/[wId]/data_sources/[name]/tables/csv.ts @@ -19,7 +19,7 @@ import { apiError, withLogging } from "@app/logger/withlogging"; export const config = { api: { bodyParser: { - sizeLimit: "10mb", + sizeLimit: "50mb", }, }, }; @@ -103,11 +103,11 @@ async function handler( } const csvRows = csvRowsRes.value; - if (csvRows.length > 100_000) { + if (csvRows.length > 500_000) { return apiError(req, res, { api_error: { type: "invalid_request_error", - message: `CSV has too many rows: ${csvRows.length} (max 100_000).`, + message: `CSV has too many rows: ${csvRows.length} (max 500_000).`, }, status_code: 400, });