You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I upgraded to the latest version of nestia and wasn't thrilled about having to use fastify-multer with TypedFormData.Body. Since fastify-multer is just an unmaintained port that was last published 3 years ago.
I wanted to keep using @fastify/multipart so I hacked around and got it working how I wanted with nestia. Figured I'd share since I think the new interface is less desirable for fastify users.
The nice part is that it uses the normal nestjs body and the validation pipes apply to it because of attachFieldsToBody. Obviously super hacky, but maybe you could add first class support for @fastify/multipart? Also please let me know if there was a better way.
The best case scenario for me would be if nestia was okay with having the File type in a dto. Also it would update the content type to be multipart/form-data if a file type existed in the dto.
Feedback
I upgraded to the latest version of nestia and wasn't thrilled about having to use
fastify-multer
withTypedFormData.Body
. Sincefastify-multer
is just an unmaintained port that was last published 3 years ago.I wanted to keep using
@fastify/multipart
so I hacked around and got it working how I wanted with nestia. Figured I'd share since I think the new interface is less desirable for fastify users.The nice part is that it uses the normal nestjs body and the validation pipes apply to it because of
attachFieldsToBody
. Obviously super hacky, but maybe you could add first class support for@fastify/multipart
? Also please let me know if there was a better way.The text was updated successfully, but these errors were encountered: