node-formidable / formidable

The most used, flexible, fast and streaming parser for multipart form data. Supports uploading to serverless environments, AWS S3, Azure, GCP or the filesystem. Used in production.
MIT License
7k stars 680 forks source link

What are the breaking changes in v3.0.0? #947

Closed cagross closed 11 months ago

cagross commented 11 months ago

Hello. I see v3.0.0 was released. And in the changelog I see a list of changes. But can someone maybe describe which of these are breaking changes?

I have formidable installed as a dependency in my app. Before updating to v3.0.0 I'd like to be 100% sure I understand what exactly the update will break (if anything).

Thanks in advance.

GrosSacASac commented 11 months ago

Since we use semver breaking changes can only be in 3.0.0

files and fields values are always arrays

cagross commented 11 months ago

@GrosSacASac OK thanks very much for that info--it's a big help.

I have one more request though--one I'm making with a very charming pretty please :-). To help me find these use cases in our app, would you be able to provide me with an example or two to illustrate this breaking change? For example, as someone not too familiar with Formidable, what exactly is meant by 'files and fields values' in this case?

GrosSacASac commented 11 months ago

the form.parse callback expects 3 arguments, error fields and files. fields and files are objects. The individual values for the fields and files are now arrays of whatever it was before.

cagross commented 9 months ago

Sorry for the late reply. But thank you for that explanation @GrosSacASac . It helped me locate and fix code of mine.