Next.js Discord

Discord Forum

Server Actions bodySizeLimit configuration is not working

Unanswered
Broad-snouted Caiman posted this in #help-forum
Open in Discord
Broad-snouted CaimanOP
  experimental: {
    serverActions: true,
    serverActionsBodySizeLimit:"5mb",
So as I checked the syntax for bodySize configuration for server Actions is different in next.13 but it Still does not work. I am getting 'size limit is 1mb' error What can I do ?

8 Replies

@Broad-snouted Caiman They've changed to way to set the BodySizeLimit in the next.config.ts --> https://nextjs.org/docs/app/api-reference/functions/server-actions#size-limitation
Broad-snouted CaimanOP
yes but that's for next 14 I gues here's the types for next13
I can not pass anything else than bool value
Which version of next13 are you using? They've added the serverActionsBodySizeLimit in >=13.4.8
Maybe the version you are working with is lower?
Broad-snouted CaimanOP
Yes I just installed latest version, hope it won't conflict with other dependencies ( last time I did, it did.)