Open fgodino-milu opened 6 months ago
As I also have to consider the fastify case, supporting express-multer options are not easy problem.
Will you suggest or send a PR that can make both express and fastify compatible?
Hi @samchon
I found this package https://www.npmjs.com/package/fastify-multer, which is a port of express-multer
. It supports the same options and it outputs the same output types.
I think using this library would simplify it a bit.
Let me know what you think
Seems good. What about challenge a PR in here code?
https://github.com/samchon/nestia/blob/master/packages/core/src/decorators/TypedFormData.ts
@samchon what do you think about the PR?
I looked your PR. Changing dependent library of @TypedFormData()
in fastify
requires major level update.
As I'm not developing the multipart/form-data
type in the backend development, so I can't sure that fastify-multer
is enough valuable for processing the major version level update. I hope many other users' opinions of this issue, but as you know, nestia
users are not such a lot.
Therefore, consider the aspect and tell me your opinion about this thing. If you still think that the major version update is valuable, I'll re-check it when typia
v7 and nestia
v4 major updates.
I think this would be a great addition since the multipart uploads are a big part in some projects that heavily depend on multimedia files. The other solution that would not require a breaking change is to have different options in the @TypedFormData decorator for fastify and express. I believe though, that the unification simplifies things
Feature Request
Problem
Currently, @TypedFormData.Body() uses multer to read and store file uploads but it doesn't support passing options to the multer singleton.
I am trying to use DiskStorage to store uploads but multer uses MemoryStorage by default.
Additionally, the type of files within @TypedFormData.Body() is File, which hides a lot of the information in Express.Multer.File types and it's not supported in Node versions prior two 20.
Request
Thanks!