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
And I'm very curious about your use case :)
Brandon Blaylock
@baetheus
Ah, I had figured this out already, and you are exactly right. Here is where I've used it: https://github.com/baetheus/nullbot-response/blob/master/index.js#L123
Brandon Blaylock
@baetheus
The telegram api lets you define a webhook endpoint. So if you want to receive an update and respond with media, you've gotta send multipart/form-data in the response, which form-data is totally capable of doing. It was easy enough to figure out once I read the mime rfcs and looked at the raw output of a form-data stream. When I get some time to work on programming projects again I will probably revisit form-data and look into getting it up to speed with streams3.
Alex Indigo
@alexindigo
Funny
I'm writing pretty much same thing
but for fb bots :)
and made conscious effort it web server agnostic :)
Alex Indigo
@alexindigo
"to make it"* :)
Oleg Sucharevich
@olsynt
Hi , some one is online ? :)
Got some question with simulating form data from html with blob file in my nodejs app
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