Skip to content

Commit

Permalink
enh: increase max number of CSV rows (#3354)
Browse files Browse the repository at this point in the history
* enh: increase max number of CSV rows

* allow bigger files

---------

Co-authored-by: Henry Fontanier <[email protected]>
  • Loading branch information
fontanierh and Henry Fontanier authored Jan 22, 2024
1 parent 50ddbbb commit 727a452
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions front/pages/api/w/[wId]/data_sources/[name]/tables/csv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { apiError, withLogging } from "@app/logger/withlogging";
export const config = {
api: {
bodyParser: {
sizeLimit: "10mb",
sizeLimit: "50mb",
},
},
};
Expand Down Expand Up @@ -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,
});
Expand Down

0 comments on commit 727a452

Please sign in to comment.