Skip to content
Discussion options

You must be logged in to vote

I finally resolved it after hours of hard work and on the edge of disappointment when I went after using this solution for file uploads in Simple Nextjs File Upload — Backend API
the only problem was with next.js's default bodyParser.
so all I had to do was to add the following configuration lines to api/upload.js

export const config = {
  api: {
    bodyParser: false,
  },
};

Happily everything works fine now!

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@hafabdulsami
Comment options

@Grimshinigami
Comment options

Answer selected by qbodk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants