Skip to content

What are the differences between using an API Route and using a mutation? #2270

Answered by MrLeebo
zwl1619 asked this question in Q&A
Discussion options

You must be logged in to vote

For a file upload you would use an API route (or getServerSideProps). Mutations can only send and receive JSON as the content type, but you probably want to upload the file using multipart form data instead.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zwl1619
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