Skip to content

How to post multipart/form-data from +server.ts? #6122

Answered by ssbm-oro
ssbm-oro asked this question in Q&A
Discussion options

You must be logged in to vote

i found a solution that works, i just need to replace the fetch i'm using from svelte-kit's fetch to node-fetch.

import fetch from 'node-fetch'

Should i open an issue regarding this problem with sveltekit's fetch? Seems like it should be able to serialize FormData the same way node-fetch does.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@geoffrich
Comment options

Answer selected by ssbm-oro
Comment options

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

@StrawHatHacker
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants