How fix "Error: Body exceeded 1mb limit" when i uses api actions? #51097
Answered
by
devjiwonchoi
baldTooth
asked this question in
App Router
-
How fix "Error: Body exceeded 1mb limit" when i uses api actions? Thanks/ |
Beta Was this translation helpful? Give feedback.
Answered by
devjiwonchoi
Jun 10, 2023
Replies: 1 comment 2 replies
-
Increase the export const config = {
api: {
responseLimit: false | '8mb' | YOUR_DESIRED_SIZE_LIMIT,
},
} UPDATEThis feature has been blocked since You need to customize the The file is located in UPDATE2Resolved with #51104 Reference |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
baldTooth
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Increase the
response size limit
by using a custom config in yourAPI
file.UPDATE
This feature has been blocked since
App Router
. It is currently hard-coded to1mb
as you can see here.You need to customize the
parseBody()
size manually throughnode_modules
.. not recommended but no "quicker" option is available at this moment.The file is located in
node_modules\next\dist\server\app-render\action-handler.js
.UPDATE2
Resolved with #51104
Reference
1mb