bodysizelimit exceeded 1MB even though it's set to 5MB in serverActions experimental settings
Unanswered
Asiatic Lion posted this in #help-forum
Asiatic LionOP
As the title states, I changed my bodysizelimit to 5mb in my nextconfig as seen below, but for some reason when I try to upload a picture that exceeds 1mb it says that "Body exceeded 1 MB limit. To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit". Visiting the docs re-states what I'm already doing, has anyone had similar issues or know a fix for this?
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
experimental: {
serverActions: {
bodySizeLimit: '5mb',
},
},
};
export default nextConfig;4 Replies
Asiatic LionOP
Also the image is 1.02MB, so technically over the 1MB limit it's claiming to impose, but under 5MB which would be accetable under my configuration.
Northeast Congo Lion
Hi, @Asiatic Lion
Nice to meet you.
It is my pleasure to help you.