-
Couldn't load subscription status.
- Fork 295
Closed
Description
Environment
- Operating System: Darwin
- Node Version: v18.18.2
- Nuxt Version: 3.7.4
- CLI Version: 3.9.0
- Nitro Version: 2.6.3
- Package Manager: [email protected]
- Builder: -
- User Config: telemetry, vite, nitro, experimental, app, runtimeConfig, css, modules, site, sitemap, googleFonts, tailwindcss, prismic, i18n, devtools
- Runtime Modules: @nuxt/[email protected], @nuxtjs/[email protected], @nuxtjs/[email protected], @vueuse/[email protected], @nuxtjs/[email protected], @nuxtjs/[email protected], [email protected], [email protected]
- Build Modules: -
Reproduction
https://stackblitz.com/edit/github-vcth9o?file=app.vue
Describe the bug
Hi!
When i try to read FormData with const formData = await readFormData(event) I receive this error:
[nuxt] [request error] [unhandled] [500] Error: Unexpected end of multipart data
It's come from Busboy
The problem appear when i set Content-Type on nuxt useFetch (also if i set lowercase content-type)
const headers = new Headers({
'Content-Type': 'multipart/form-data; boundary=someBoundary',
})
const formData = new FormData()
formData.append('test', 'string')
const { data, error } = await useFetch('/api/file-upload', {
method: 'POST',
headers,
body: formData,
})If i don't set Content-Type in local dev work perfect but on Netlify the problem appear again.
Did you know why?
Thank guys!
Additional context
No response
Logs
No response
PatSosna
Metadata
Metadata
Assignees
Labels
No labels