Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Adapter Netlify] multipart/form-data not supported #5494

Closed
f-elix opened this issue Jul 13, 2022 · 4 comments
Closed

[Adapter Netlify] multipart/form-data not supported #5494

f-elix opened this issue Jul 13, 2022 · 4 comments
Labels
bug Something isn't working pkg:adapter-netlify
Milestone

Comments

@f-elix
Copy link
Contributor

f-elix commented Jul 13, 2022

Describe the bug

Since updating to Sveltekit v370 and adapter-netlify v68, forms with enctype multipart/form-data don't work anymore when deployed to Netlify. Even if no file is sent to the server, a NotSupportedError is thrown with the message multipart/form-data not supported.

This used to work fine, so I don't think the problem is with Netlify (unless they had an update I wasn't aware of).

Reproduction

Repo: https://github.com/f-elix/netlify-multipart-formdata-bug

Deployed url: https://chipper-moxie-864d1d.netlify.app/

Go to the deployed url and submit the form to see the error.

Logs

{
name: "NotSupportedError",
message: "multipart/form-data not supported",
stack: "NotSupportedError: multipart/form-data not supported",
code: "UND_ERR_NOT_SUPPORTED"
}

System Info

System:
    OS: macOS 12.4
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 1.12 GB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
    npm: 8.12.1 - ~/.nvm/versions/node/v16.13.0/bin/npm
  Browsers:
    Chrome: 103.0.5060.114
    Firefox: 79.0
    Safari: 15.5
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.57 
    @sveltejs/adapter-netlify: ^1.0.0-next.68 => 1.0.0-next.68 
    @sveltejs/kit: next => 1.0.0-next.370 
    svelte: ^3.44.0 => 3.49.0 
    vite: ^2.9.13 => 2.9.14

Severity

blocking an upgrade

Additional Information

No response

@dummdidumm
Copy link
Member

Likely a duplicate of #5349 which was fixed through #5629 - could you check with the latest version of SvelteKit if this issue still persists?

@brittneypostma
Copy link
Contributor

brittneypostma commented Jul 21, 2022

I am seeing the same issue on a new demo app with adapter-netlify installed and split: true in the config file. I was testing this issue to see if it had been resolved. I no longer get an error on the page, but now get the form not supported error below.

{
name: "NotSupportedError",
message: "multipart/form-data not supported",
stack: "NotSupportedError: multipart/form-data not supported",
code: "UND_ERR_NOT_SUPPORTED"
}

Cannot add todos to the /todos route.

@garytube
Copy link

Facing this issue after updating from 360 to 394.

I have a ASP.net Backend which gets a FormData send by SvelteKit.

Always getting a 415 - Unsupported Media Type.

Rolled back SvelteKit and it works again.

@Rich-Harris Rich-Harris added the bug Something isn't working label Sep 6, 2022
@Rich-Harris Rich-Harris added this to the whenever milestone Sep 6, 2022
@sarahetter
Copy link

Hey! Here from the Netlify frameworks team. I've just tested this with the current versions:

		"@sveltejs/adapter-netlify": "2.0.4",
		"@sveltejs/kit": "^1.5.0",

with a +server.ts file, and the form submits properly, and the response is as expected without error.

I believe this is alright to close as the broken versions are quite outdated.

@gtm-nayan gtm-nayan closed this as not planned Won't fix, can't repro, duplicate, stale May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg:adapter-netlify
Projects
None yet
Development

No branches or pull requests

7 participants