the v3 plan?
See original GitHub issue- require Node 10 or 12
- latest Stream APIs
pipeline(...streams, (err) => {})
- https://nodesource.com/blog/understanding-streams-in-nodejs/
- https://nodejs.org/api/stream.html
- https://www.youtube.com/watch?v=aTEDCotcn20 (Matteo Collina, NearForm, Node core)
- Readable Stream by default, #360 ?
- strictly only
multipart/*
? - util wrappers around iterators & async iterators
- rewrite MultipartParser class to async generator function?
- so we can
Readable.from(multipart())
?
- so we can
- compatible (make use of)
VFile
orVinyl
? v2?- battles path related things and opreatons
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’s pipeline()
. Something like this
const { pipeline, MultipartParser, formidable } = require('formidable');
// accepts a callback, or returns a promise if no cb
const { fields, files } = await pipeline(req, formidableOptions);
// if they want more transform or whatever,
// they can add more things, just like in the Node's pipeline()
const { fields, files } = await pipeline(
req,
...streams,
...iterators,
);
// or directly using the native pipeline()
const parser = new MultipartParser(); // it's Transform Stream
await promisify(stream.pipeline)(
req,
parser,
formidable(),
);
Issue Analytics
- State:
- Created 3 years ago
- Comments:41 (32 by maintainers)
Top Results From Across the Web
Planning - V3 Companies
V3's highly-skilled planning team utilizes its diverse local, national and international experience to provide professional advice that results in pragmatic ...
Read more >Plan V1 V2 V3 V4 V5, Past Simple and Past Participle Form of ...
Plan V1 V2 V3 V4 V5, Past Simple and Past Participle Form of Plan. Verb; Plan. Meaning; scheme, layout, plot, program. V1, V2,...
Read more >App Service Pricing | Microsoft Azure
Free and Shared (preview) Azure App Service plans provide different options to test ... App Service Environment v3 is now generally available -...
Read more >V3 plans - TBM
Find here the V3 plan of the TBM network. ... My account. The TBM network. Fil d'Ariane. Home · V3; Maps. Map of...
Read more >My v3 ads || all plan details - YouTube
myv3ads #tamil #v3onlinetv #tamil #workfromhomejob #onlinejobs My V3 ads zero investment plan more details https://w.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I see it as breaking changes (fields and files output changen new dependency) so we can start with version 4.x I add you to formdiable github so you can create new branches and make commits if you want to try to implement your ideas in a new branch, (use 3.x as a starting point)
Overall I like the ideas to move towards web apis when possible.
FormData could be used for both sending and receiving, We wouldn’t have Response.formData() or Request.formData() otherwise. They exist so you can intercept the payload from Service Worker. FormData did not have any method for reading/manipulating a FormData earlier but now we have
.has(), .delete(), .get(), .entries(), for..of
and so onSo yes, I’m proposing to use a FormData package to make it easy to forward a received form. But also for parsing and consuming a received form
I think it would be cool if
form.formData()
could utilize a FormData package and resolve the stream with a FormData instance. Here is an example from the Readme that i have rewritten:(calling
form.formData()
would work for both urlencoded and multipart payloads)On a side note: you said you wanted to handle a (web)stream… that would be 👍, it would be great if formidable was not so bound to HttpIncomingRequest so you can just hand it some iterable object (wheater it be stream, req, webstream or any asyncIterator) - so something like:
const formData = await form.formData(iterable, contentType)
maybe? idk