diff --git a/packages/backend/src/server/api/index.ts b/packages/backend/src/server/api/index.ts index fc6e0158d..bfbc6a3fe 100644 --- a/packages/backend/src/server/api/index.ts +++ b/packages/backend/src/server/api/index.ts @@ -40,7 +40,14 @@ app.use(async (ctx, next) => { app.use(formidable()); app.use( - bodyParser(), + bodyParser({ + // リクエストが multipart/form-data でない限りはJSONだと見なす + detectJSON: (ctx) => + !( + ctx.is("multipart/form-data") || + ctx.is("application/x-www-form-urlencoded") + ), + }), ); // Init multer instance