From 696bd9b3924aa9b14a5bb7767290e01ae9482cbc Mon Sep 17 00:00:00 2001 From: Z8MB1E Date: Sat, 5 Sep 2026 00:02:22 -0400 Subject: [PATCH] feat(wiki): enable image uploads via server actions Raise the serverActions request body limit to 10mb so wiki image uploads (capped at 8mb in uploadWikiImage) pass through with room for multipart overhead. --- next.config.mjs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/next.config.mjs b/next.config.mjs index bca6cbe..c7a1cfd 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -3,13 +3,18 @@ import path from "node:path"; import { fileURLToPath } from "node:url"; import packageJson from "./package.json" with { type: "json" }; - /** @type {import('next').NextConfig} */ const nextConfig = { // Your Next.js config here env: { version: packageJson.version, }, + // Server Actions default to a 1 MB request body limit, which would reject + // most image uploads. Bump it so wiki image uploads (capped at 8 MB in the + // uploadWikiImage action) pass through with room for multipart overhead. + serverActions: { + bodySizeLimit: "10mb", + }, // Pin the workspace root to this repo dir so the standalone build emits a // flat .next/standalone/server.js (Next otherwise walks up looking for // lockfiles and can pick a parent directory — here a stray