strikeentco / multi-part

Simple multipart/form-data implementation with automatic data type detection. Supports: Strings, Numbers, Arrays, Streams, Buffers and Vinyl.
MIT License
10 stars 2 forks source link

Deprecate? #12

Open jimmywarting opened 3 years ago

jimmywarting commented 3 years ago

... in favor of spec compatible FormData implementations.

There are at least 2 other FormData multipart pkg on npm

Both of which supports appending Blob + File like items. So calculating content-length without reading a stream or anything like that is in a since better. Both also runs some WPT tests to be spec compatible with generating correct filenames and stuff and has all the methods that are needed.

perry-mitchell commented 7 months ago

@jimmywarting It looks like your formdata-polyfill doesn't support streams as values in multi-part sections, whereas this library does. Any plans on adding this? Imo without it this library is still very relevant.

The formdata-node implementation of stream handling is verbose and honestly a PITA compared to this library.