Closed zhoupengqiang closed 3 years ago
Yes, it is necessary and it makes sense to turn it on by default.
If you are curious why it wasn't set to "true" by default - read this discussion. If we turned it on while implementing it, the library would have become backward incompatible. So it was implemented as an "option" so that older applications depending on Formidable didn't break.
Anyway, it may be set to "true" in the next major version. I will mark this as "feature" request, so that we could get back to it when implementing the next major version.
Should we do it now ?
canary doesn't seem to have this behaviour (yet ?)
@VictorJozwicki what you mean?
I thought this thread would imply that at some point multiples: true
would be the default behaviour ?
@VictorJozwicki yes, not yet. It's easy option and there're bigger problems, haha.
npm i node-formidable/formidable#3.x
I think
multiples=true
is the correct behavior andmultiples = false
incorrect when I upload multiple files in an input tag because of incorrect info in parsed files object.I don't think user have to set multiples. The parsed files object should always give right info, either depending on user upload or always use an array for a named input.