Get file as Buffer
sboudouk opened this issue · comments
Support plan
- which support plan is this issue covered by? (e.g. Community, Sponsor, or
Enterprise): Community - is this issue currently blocking your project? (yes/no): yes
- is this issue affecting a production system? (yes/no): no
Context
- node version: 16.18
- module (formidable) version: 2.0.1
- environment (e.g. node, browser, native, OS): node
- used with (i.e. popular names of modules): nestjs (express)
- any other relevant information:
What problem are you trying to solve?
Thanks for the insane work behind formidable, it really a life changer. I just wanted to know or ask if there is a feature planned to make the file available as Buffers like multer do, instead of having to read them, then make a buffer.
If there is already a way it would be great to have an exemple for achieving this, and I would be glad to do a PR to add it to the documentation. I've searched on existing issues and played a bit with fileWriteStreamHandler
but with no success.
Thanks for your help and your valuable work.
Do you have a new or modified API suggestion to solve the problem?
Add a file.buffer or file.toBuffer method to the file/volatilefile object , or if this is already possible, snippet to the documentation.
Thanks.
Please help review this PR #855