Coder Social home page Coder Social logo

Comments (12)

dougwilson avatar dougwilson commented on May 27, 2024

Hello, and sorry you are having this issue. Unfortunately a simple html form and the module I wasn't able to reproduce the issue. Can you please put together all the needed code and steps in order for me to reproduce the issue so I can debug it? Thank you.

from multiparty.

wyu19 avatar wyu19 commented on May 27, 2024

Hi I'm not able to piece together all the code needed. Could you show me the example you did?

from multiparty.

dougwilson avatar dougwilson commented on May 27, 2024

The example at the top of the readme was all I used: https://github.com/pillarjs/multiparty#usage

from multiparty.

wyu19 avatar wyu19 commented on May 27, 2024

Could you show me the flow of how form.parse() works and I can try to debug it on my own?

from multiparty.

dougwilson avatar dougwilson commented on May 27, 2024

Hi, I'm not sure what you are looking for in "show me the flow of how form.parse() work". The source code is open in this repo, and debuggers would have a step in feature to step around, add additional break points, etc.

from multiparty.

wyu19 avatar wyu19 commented on May 27, 2024

Also is there a way for me to verify my formdata is correct? When i create it based on my form i see that its an object:
image

from multiparty.

dougwilson avatar dougwilson commented on May 27, 2024

The FormData object is not part of this module. You can read about the methods it has to use to introspect it here: https://developer.mozilla.org/en-US/docs/Web/API/FormData

from multiparty.

wyu19 avatar wyu19 commented on May 27, 2024

I've done some debugging and got confused on some parts of the code. The problem seems to be that line 126 and line 127 only executes after the callback is returned. line 103 waitend and req.readable is false so it goes to done() function and returns calls the callback function in line 131 with an empty files object. Why does it not execute line 126 and 127 until after callback?
image

from multiparty.

dougwilson avatar dougwilson commented on May 27, 2024

Hm, strange, it should only do that if there were no files in the request. Are you seeing that only when you are using your upload code at issue or does it also happen when debugging with the example in the readme?

from multiparty.

wyu19 avatar wyu19 commented on May 27, 2024

This seems to only happen inside my codebase. I have two seperate examples in the readme. One in a seperate folder from my code and i see the file filed being populated:
image

but in the example that i have inside my code base it does not have the object:
image

from multiparty.

wyu19 avatar wyu19 commented on May 27, 2024

Also I am using 6.14.13 should i be using 4.2.2?

from multiparty.

wyu19 avatar wyu19 commented on May 27, 2024

Hi, Im not sure what happened but i was having issues 6.14.13. Then i did npm install again and it downloaded the same version on my code base and everything is working now.

from multiparty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.