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

FastifyError: Content type parser 'multipart' already present. #11

Closed
dimbslmh opened this issue Aug 31, 2022 · 0 comments · Fixed by #12
Closed

FastifyError: Content type parser 'multipart' already present. #11

dimbslmh opened this issue Aug 31, 2022 · 0 comments · Fixed by #12

Comments

@dimbslmh
Copy link

Multiple registered FastifyMulterModule, results in FastifyError: Content type parser 'multipart' already present.

Initial investigation done by @jmcdo29:

These happen too close to each other and the parser hasn't yet been installed but by the time the second one tries it has.

Reproduction can be found here: https://github.com/dimbslmh/multipart

jmcdo29 added a commit that referenced this issue Aug 31, 2022
By moving the registration of the multipart content parser
to a separate core module, the core module only gets activated
once which allows for multiple `registerAsync` calls without
calling the `fastify.register()` multiple times. This should
resovle the error in #11.

fix: #11
jmcdo29 added a commit that referenced this issue Aug 31, 2022
By moving the registration of the multipart content parser
to a separate core module, the core module only gets activated
once which allows for multiple `registerAsync` calls without
calling the `fastify.register()` multiple times. This should
resovle the error in #11.

fix: #11
@jmcdo29 jmcdo29 closed this as completed in 4a17bbf Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant