We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I upgrade from Fastify v4.28 to 5.2, uploads of multipart/form-data failed with a 415 HTTP:
{ "code": "FST_ERR_CTP_INVALID_MEDIA_TYPE", "name": "FastifyError", "statusCode": 415, "message": "Unsupported Media Type: multipart/form-data; boundary=---------------------------33065737953259411260621758869" }
I found a workaround by replacing the standard :
server.register(multer.contentParser)
with the following:
server.addContentTypeParser('multipart/form-data', function (request, payload, done) { done(null) })
I suggest you change the code on lib/content-parser.ts with:
lib/content-parser.ts
fastify.addContentTypeParser('multipart/form-data', setMultipart)
The text was updated successfully, but these errors were encountered:
fix(content-type): Fastify v5 parser leads to HTTP 415
facaf62
Fix fox1t#35
Successfully merging a pull request may close this issue.
When I upgrade from Fastify v4.28 to 5.2, uploads of multipart/form-data failed with a 415 HTTP:
I found a workaround by replacing the standard :
with the following:
I suggest you change the code on
lib/content-parser.ts
with:The text was updated successfully, but these errors were encountered: