Skip to content

How to use formidable to upload large .mp4 files? #966

Answered by littlebee
littlebee asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry about not seeing it earlier, but I found the cause. The above code DOES work with mp4 files and the problem was the offscreen code where I set the Next.js config for bodyParser to accept large files. bodyParser needs to be disabled for Formidable to work on Next.js. I'll leave this post and mark it as answered for anyone else stumbling down the same path.

// Body parser is disabled for this route because formidable handles it.
export const config = {
  api: {
    bodyParser: false,
  },
};

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by littlebee
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants