#Body undefined whenever I use Fastify with Nest
16 messages · Page 1 of 1 (latest)
Body is appear to be undefined
Are you talking about the.bodyproperty in the request context?
that's a GET endpoint, and it won't accept body.
oops, sorry! you're right, actually I have experience with expressJs only. I'm just starting to learn Nest but with Fastify.
Could you do one help more please?
don't worry, it happens to the best of us 
Please don't ask to ask. Just ask your question.
How can I handle the multipart/form-data?
Cause I use this
and it gives me error:
FastifyError: Unsupported Media Type: multipart/form-data; boundary=--------------------------662509497575091929290719
that behavior is documented.
Multer cannot process data which is not in the supported multipart format (
multipart/form-data). Also, note that this package is not compatible with theFastifyAdapter.
a workaround is to install and register the @fastify/multipart plugin, there are plenty of samples online.
it will actually accept body (qt least with express), but you will not be able to send it from the browsers, only from another server with correct tools/libs