dmitriy-nz / nestjs-form-data

NestJS middleware for handling multipart/form-data, which is primarily used for uploading files.
https://www.npmjs.com/package/nestjs-form-data
MIT License
129 stars 24 forks source link

feat: added support for fastify #53

Closed 0x67 closed 1 year ago

0x67 commented 1 year ago

Added support for Fastify, require @fastify/multipart to be installed.

It's actually just updating the FormDataInterceptor to check if the request have raw property or not since request from Fastify always has raw property attached. I've updated all the tests as well and it pass with exception of auto delete test have intermittent error: sometimes it pass and sometimes not.

Reason: Been using this package for a while and recently some of the project I did migrated to Fastify so I decided make this library also support Fastify.

If not approved, can just close this PR and I'll publish the fork separately.

dmitriy-nz commented 1 year ago

@0x67 Hi! Thank you for supporting this project, I'm glad it helps to make the experience of working with multipart on nestjs easier. I have run the tests several times and the tests are running without errors, maybe you can open a separate issue with a more detailed description, your version of nodejs and maybe logs to help us understand the issue with auto deleting.

dmitriy-nz commented 1 year ago