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.
This commit is contained in:
parent
28ced660c0
commit
696bd9b392
1 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue