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
7.01k stars 680 forks source link

fix: PersistentFile.toString() doesn't throw #796

Closed pedroslopez closed 2 years ago

pedroslopez commented 2 years ago

Calling toString() on a PersistentFile was throwing:

Uncaught Rejection stack=TypeError: Cannot read property 'newFilename' of undefined
    at PersistentFile.toString (formidable/src/PersistentFile.js:50:42)

It seems like ._file wasn't set anywhere, and toJSON was using these directly anyway.

GrosSacASac commented 2 years ago

Published as 3.1.5

pedroslopez commented 2 years ago

Published as 3.1.5

Thanks! How does the v2 situation work? Should I make another pr against v2-latest?

GrosSacASac commented 2 years ago

I recommend to forget v2