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
125 stars 25 forks source link

Is it battle-tested? #7

Closed unkindypie closed 3 years ago

unkindypie commented 3 years ago

Is this lib ready for production? Can it handle the same load as multer does? I'm currently picking lib for my project and not sure which more suitable for production at the moment.

dmitriy-nz commented 3 years ago

This library, like multer, is a wrapper over busboy, it has the maximum performance. But you need to understand that validation through DTO decorators works after the file is loaded, while validation through the limits object when decorating @FormDataRequest will work during file loading, which is a more performant solution.

Also, for uploading large files, you should use the FileSystemStoredFile storage.

unkindypie commented 3 years ago

Thanks for the answers. Seems that your lib is the best currently available solution for using formdata with nestjs.