Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
Alex Indigo
It just works™ ;)
Karim Ellaisy
@alexindigo Are you available for assistance on a a rather complex (imo lol) scenario?
Alex Indigo
@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
@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:
More clear when you click on it oops haha
Alex Indigo
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

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


Help me, please. Thank you.

Dylan Piercey
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
@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
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
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
Hi... is it possible to use form-data to parse the body in a incoming multipart/form-data request?
Alex Indigo
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
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
Thanks for your interest @yordis
Let’s see what you have in store :)
Yordis Prieto
@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
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?
can i ask abt multipart and blobs here?
Yordis Prieto
@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
hey @yordis I'm sporadically available, is it 408 you're talking about?
@jedwantstocode just ask and one of us will answer
Yordis Prieto
@alexindigo yes I am talking about #408
Basic question is, do I need to do that when I do a set?
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?
Sorry, my bad. Problem was in old cached version of form-data.
Jared Evans
Hey, I opened #426 but perhaps here is the better place for this
Alex Indigo
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
cheers, think i'll just have to use the request module for now though
Hey, I opened #436. Just posting here in case this chat is busier than the Github page.
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
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
Anyone have any luck streaming a AWS S3.getObject().createReadStream() into a form-data value?
e.g. formData.append('file', s3FileStream);

Hi Guys,

I am pretty new to python falcon framework
I am trying to upload image to my server running using Flacon-Gunicorn.
on_post I am trying to following but its failing.

import ast
import cgi
req.context['doc'] = {}
req.context['form'] = {}
req.env.setdefault('QUERY_STRING', '')
form = cgi.FieldStorage(fp=req.stream, environ=req.env)

above print gives be None values as below
FieldStorage(None, None, [])

From client side I am doing following

files = { 'file': ('user1.png', open('user1.png', 'rb'))}
headers = {'Content-type': 'multipart/form-data; boundary=boundary'}
data={'abc': 'abc'}
image_url = 'http://localhost:4002/xyzservice/images'
resp = requests.post(image_url, auth=HTTPBasicAuth(uname, pass),
headers=headers, files=files, data=data)

Is there anything wrong here?
Please help me.

Hello, has anyone worked with camel-rest multipart file uplod?

Hi all, I'm having trouble getting a simple http call with form-data to work.

var actionData=new FormData();
var filestream = fs.readFileSync(filePath);
actionData.append('file', filestream);
actionData.append('comment', "foobar");
actionData.append('minorEdit', "true");


const attachmentOptions = {
    hostname: 'confluence.corp.xxx.com',
    port: 443,
    path: `/rest/api/content/${id}/child/attachment?os_authType=basic`,
    method: 'POST',
    data: actionData.getBuffer().toString(),
    headers: {
        "Authorization": 'Basic ' + after,  //this part is ok
        "X-Atlassian-Token": 'nocheck'

const attachReq = https.request(attachmentOptions, res => {
    console.log(`statusCode: ${res.statusCode}`);
    res.on('data', d => {

attachReq.on('error', error => {

I just need to properly send the contents of a PNG file. I've been on this for hours with no luck, what am I missing? Any help is appreciated.