Skip to content

Commit

Permalink
Increase file upload limit in create-item-controller (#326)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeknovy authored Jun 1, 2024
1 parent ad116c2 commit e44d241
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/server/controllers/item/create-item-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ import { DataParsingException } from "../../errors/data-parsing-exception"
import { itemErrorHandler } from "./shared/item-error-handler"

const pg = pgp()
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
const FILE_LIMIT = 5120 * 1024 * 1024

const upload = multer(
{
dest: "./uploads",
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
limits: { fieldSize: 2048 * 1024 * 1024 },
limits: { fieldSize: FILE_LIMIT },
}).fields([
{ name: "kpi", maxCount: 1 },
{ name: "monitoring", maxCount: 1 },
Expand Down

0 comments on commit e44d241

Please sign in to comment.