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
Or did I miss something?
Dylan Piercey
@DylanPiercey
Well with browserify and webpack you can specify requires within the config as well, (usually a good spot for polyfills), which simply requires the file without having to do it explicitly in app code.
Since in the browser you are expecting form-data to be there it makes sense to make it global anyway since it would help people transitioning from dom code to isomorphic code.
Alex Indigo
@alexindigo
And Browserify would add it to the globsl space?
Dylan Piercey
@DylanPiercey
Yeah
Alex Indigo
@alexindigo
Didn't expect such behavior from Substack's creation :)
As for IE9 polyfill, find stream library that works there
Dylan Piercey
@DylanPiercey
:p it's not the most intuitive configuration but it works.
And the problem with IE9 is there is no fileapi / way to get file elements as blobs.
Alex Indigo
@alexindigo
and form-data itself is just thin layer on top
I see
Dylan Piercey
@DylanPiercey
form.append("myfile", document.querySelector("input[type='file']")
type thing.
Which means I will likely have to use flash or something.
Alex Indigo
@alexindigo
Understood
Or just wait for IE10-11 :)
Dylan Piercey
@DylanPiercey
:p.
Alex Indigo
@alexindigo
And I have another idea to try
Dylan Piercey
@DylanPiercey
Whats that?
Alex Indigo
@alexindigo
Automate pushes to npm via codeship or something like that
Created tag on github it pushed to npm automatically
Dylan Piercey
@DylanPiercey
That'd be cool, never thought of using tags for that.
Alex Indigo
@alexindigo
it's how many enterprises do deployment
For audit purposes and whatnot
Dylan Piercey
@DylanPiercey
Ah cool.
Well I have to get to bed, so i'll chat with you later.
Alex Indigo
@alexindigo
yep, same here, have a good one
Brandon Blaylock
@baetheus
Heya Alex, I'm wondering if form-data can be used to pipe multipart\form-data to an http response stream. Would this just require generating and passing in custom headers in the options parameter or does form-data always expect to act as an http client?
Alex Indigo
@alexindigo
hey
supposedly you can just pipe, since it's just a stream. Check out this example – https://github.com/form-data/form-data#alternative-submission-methods
It should get you going.
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