You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think we can just wrap the Node's stream.pipeline() and provide it to our users, but they still will be able to do whatever they want, using the Node's pipeline(). Something like this
const{ pipeline, MultipartParser, formidable }=require('formidable');// accepts a callback, or returns a promise if no cbconst{ fields, files }=awaitpipeline(req,formidableOptions);// if they want more transform or whatever,// they can add more things, just like in the Node's pipeline()const{ fields, files }=awaitpipeline(req,
...streams,
...iterators,);// or directly using the native pipeline()constparser=newMultipartParser();// it's Transform Streamawaitpromisify(stream.pipeline)(req,parser,formidable(),);
pipeline(...streams, (err) => {})multipart/*?Readable.from(multipart())?VFileorVinyl? v2?Okay, some thoughts.
I think we can just wrap the Node's
stream.pipeline()and provide it to our users, but they still will be able to do whatever they want, using the Node'spipeline(). Something like this