From b08b9abe5a70d7fdac72ac829a4bf97cebd266d8 Mon Sep 17 00:00:00 2001 From: pbc1017 Date: Thu, 21 Dec 2023 13:19:43 +0900 Subject: [PATCH] :ambulance: fix max post size --- back/server.js | 4 ++++ front/src/pages/AddActivity/AddActivity.tsx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/back/server.js b/back/server.js index d123c80..05d119d 100644 --- a/back/server.js +++ b/back/server.js @@ -47,6 +47,10 @@ app.use( }, }) ); +var bodyParser = require("body-parser"); + +app.use(bodyParser.json({ limit: "100mb" })); +app.use(bodyParser.urlencoded({ limit: "100mb", extended: true })); sequelize .sync({ force: false }) //true면 서버 실행마다 테이블 재생성 diff --git a/front/src/pages/AddActivity/AddActivity.tsx b/front/src/pages/AddActivity/AddActivity.tsx index 367fc78..b9f14d8 100644 --- a/front/src/pages/AddActivity/AddActivity.tsx +++ b/front/src/pages/AddActivity/AddActivity.tsx @@ -213,7 +213,7 @@ export const AddActivity = (): JSX.Element => { const handleError = (error: any) => { console.error("Error uploading file:", error); alert( - `활동을 저장하는 도중 오류가 발생했습니다. 입력한 정보를 다시 확인해주세요. ${error}` + `파일을 업로드하는 도중 오류가 발생했습니다. 파일을 다시 확인해주세요. ${error}` ); };