-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Unable to register plugin #379
Comments
Thanks for reporting! Can you provide steps to reproduce? We often need a reproducible example, e.g. some code that allows someone else to recreate your problem by just copying and pasting it. If it involves more than a couple of different file, create a new repository on GitHub and add a link to that. |
Sorry for delay, I was reproducing the error and the it was working fine. I don't know what caused it or anything. I re-initialized the whole project and its working good. |
Found another reason for 415
|
Please open a new detailed issue adding a Minimal, Reproducible Example. |
Shall I create another issue to report this ? or continue in this thread itself ? |
a new detailed issue |
Prerequisites
Fastify version
4.4.0
Plugin version
4.1.0
Node.js version
v16.16.0
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
12.5 (21G72) on M1
Description
I have created project using fastify-cli. I'm trying to add
@fastify/multipart
plugin but the support for multipart is not added. I searched for similar issues too. I found none of them worked for mePlugins used
@fastify/autoload
@fastify/cookie
@fastify/cors
@fastify/jwt
@fastify/multipart
@fastify/session
@fastify/view
@fastify/sensible
Methods I tried
addContentTypeParser
formultipart/form-data
(multipart/form-data; boundary=--------------------------770050338242247130429317 #322 (comment))hasContentTypeParser
formultipart/form-data
after registering the plugin (@fastify/multipart
) it showedfalse
but if try to check after addingIt returns true but still throws 415 : Content type not supported. I'll post the chunks of the code I've used
Steps to Reproduce
app.ts
plugins/global.ts
here i store the plugins like multipart/form-data to be registered
Routes for multipart
activate_account_controller.ts
Output produced by postman
The output showed via cURL
The log shown during request
Expected Behavior
Expect fastify to register the plugin and work
The text was updated successfully, but these errors were encountered: