Prerequisites
馃殌 Feature Proposal
As far as I can tell, this plugin reads from request.raw:
In my usecase, which is verifying webhook signatures from Sendgrid, I'll need to have the raw binary body so that the webhook can be verified, but then parse the body as multipart. Getting both of these right does not appear to be possible with how fastify-multipart is set up right now.
If I use preParsing and read the request stream to verify it, then this plugin looks and finds the request stream empty and closed by the time it gets to the verification hook.
Motivation
Making this plugin more intuitive to use with other hooks - it did not occur to me for a long time that my preParsing hook which followed documented patterns would not work because this plugin was reading from req.raw instead of reading the payload stream.
Example
No response
Prerequisites
馃殌 Feature Proposal
As far as I can tell, this plugin reads from
request.raw:fastify-multipart/index.js
Line 263 in 60e1b5c
In my usecase, which is verifying webhook signatures from Sendgrid, I'll need to have the raw binary body so that the webhook can be verified, but then parse the body as multipart. Getting both of these right does not appear to be possible with how fastify-multipart is set up right now.
If I use
preParsingand read the request stream to verify it, then this plugin looks and finds the request stream empty and closed by the time it gets to the verification hook.Motivation
Making this plugin more intuitive to use with other hooks - it did not occur to me for a long time that my preParsing hook which followed documented patterns would not work because this plugin was reading from req.raw instead of reading the payload stream.
Example
No response