Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Alex Indigo
@alexindigo
Hi Oleg
Do you mind to elaborate a bit on "simulating form data from html"? Thank you
Karim Ellaisy
@Vikaton
Has there really been not a single message since '16 ? :D
Alex Indigo
@alexindigo
It just works™ ;)
Karim Ellaisy
@Vikaton
@alexindigo Are you available for assistance on a a rather complex (imo lol) scenario?
Alex Indigo
@alexindigo
@Vikaton generally yes, but right now I'm in the middle of somethign hot myself. So Later tonight (in ~11 hours) I'll be more open to chat
Karim Ellaisy
@Vikaton
@alexindigo I'm in EST timezone, so that would be an issue, but I'll just explain now and you can respond when you can
my goal is replicate this diagram using form-data on an already existing http2 connection:
blob
More clear when you click on it oops haha
Alex Indigo
@alexindigo
Hey, not very clear what's complex about it, looks like regulat multipart thingy. And http2 is transport, doesn't really affects the message you're sending.
FormData is a stream by itself that you can pipe into your transport stream, like request for example.
Alex Yatsenko
@yatsenkolesh

Hey, gays ! How i can make payload request like with form-data and node-fetch:

https://gist.github.com/yatsenkolesh/10f63a748e9bab711e0454522c7c3bfa

Help me, please. Thank you.

Dylan Piercey
@DylanPiercey
Hey @yatsenkolesh sorry for the late reply but node-fetch has native support for node-formdata and should work the same as in the browser.
Debajit Roy
@debajitr
@alexindigo I want to raise a PR for removing the 2MB limitation, and giving an option to pass maxDataSize as a parameter while initializing form-data. Could you give me permission to push a branch?
Alex Indigo
@alexindigo
Usually on Github, you'd fork the main repo. Make changes on your local fork and then submit pull request to the main repo. Which will be reviewed and discussed. No need for extra permissions.
Also, I don't remember where we have any specific size limitations. So I'm curious to see your PR. Thank you.
Debajit Roy
@debajitr
Thanks for the reply. Yep raised a PR. The size limit that I was mentioning was that of combined-stream. It is limited to 2MB, and when we use the create method it provides we can override the same.
Gonzalo Diaz
@sir-gon
Hi... is it possible to use form-data to parse the body in a incoming multipart/form-data request?
Alex Indigo
@alexindigo
Hey, form-data is for opposite use case
You can use something like https://www.npmjs.com/package/formidable to parse the multipart body
Yordis Prieto
@yordis
Hey @alexindigo there is a couple of issues and PR I need from the package. I am more than happy to try to fix myself some of the issues but I need your support getting those PRs merge.
Alex Indigo
@alexindigo
Thanks for your interest @yordis
Let’s see what you have in store :)
Yordis Prieto
@yordis
@alexindigo well, form-data/form-data#408 the only thing is missing is doing more complex stuff in the set since append does more than just updating a data structure
which I dont understand that much to be honest
would be helpful if we get this done
Alex Indigo
@alexindigo
I see, yes append is so complex because it’s pretty much the only interface of the library.
And form-data was inspired by similar named browser API, but it’s goal was to allow node apps to upload things to other websites, means it had to handle all kinds of data types that node developers would throw at it.
And node is more fruitful in that area, since it doesn’t have artificial limitations as browsers do.
Any specific area of the append I can explain in greater detail?
jedwantstocode
@jedwantstocode
can i ask abt multipart and blobs here?
Yordis Prieto
@yordis
@alexindigo well I will need your help understanding the complexity. Could you do some Code Review and comment what I am misisng and give me some directions about it please
Alex Indigo
@alexindigo
hey @yordis I'm sporadically available, is it 408 you're talking about?
@jedwantstocode just ask and one of us will answer
Yordis Prieto
@yordis
@alexindigo yes I am talking about #408
Basic question is, do I need to do that when I do a set?
pravorskyi
@pravorskyi
Hi. I have an issue with form.append("files", fs.createReadStream(filename), {filepath: relative });
Everything worked, but filepath parameter doesn't apply
Is this known issue with ReadStream and filepath option?
pravorskyi
@pravorskyi
Sorry, my bad. Problem was in old cached version of form-data.
Jared Evans
@JaredCE
Hey, I opened #426 but perhaps here is the better place for this
Alex Indigo
@alexindigo
I will check it out when I get home, if you don’t hear from me in 24h please ping me one more time.
Jared Evans
@JaredCE
cheers, think i'll just have to use the request module for now though
JLu76
@JLu76
Hey, I opened #436. Just posting here in case this chat is busier than the Github page.
turdasanbogdan
@turdasanbogdan
Hey guys, i want to upload multipart data, but i only want to accept some formats. The question is how can i extract the format from a multipart request, is something with mime type, or just headers ?
Alex Indigo
@alexindigo
Multipart has part specific headers types, with each part headers, that part of the http body. So you’d need to do some streaming parsing. Look into Formidable is it can do it, and ask their community, they’ll be more familiar with the matter of parsing multipart :smile: Here we’re just building the payload. :smile:
Werd Bmocsil
@aliscomb_gitlab
Anyone have any luck streaming a AWS S3.getObject().createReadStream() into a form-data value?
e.g. formData.append('file', s3FileStream);