Git Product home page Git Product logo

Comments (17)

andrewrk avatar andrewrk commented on May 3, 2024

I added a test for this, but the test passes. Can you provide a test case that demonstrates your problem?

from connect-multiparty.

youxiachai avatar youxiachai commented on May 3, 2024

if file small ,it will work well,but large file will hang request,although it throw error

from connect-multiparty.

285858315 avatar 285858315 commented on May 3, 2024

qq20140524112628
qq20140524113341

from connect-multiparty.

285858315 avatar 285858315 commented on May 3, 2024

How to fix?

from connect-multiparty.

dougwilson avatar dougwilson commented on May 3, 2024

How to fix?

We need someone (perhaps you?) to give us a patch that fixes the issue, or a single complete JS file we can run and hit the issue so we can investigate. So far no one has offered us either of those.

from connect-multiparty.

285858315 avatar 285858315 commented on May 3, 2024
var express = require('express');
var app = express();
app.set('port', 3000);

var serveStatic = require('serve-static');
app.use(serveStatic('./public', {'index': ['default.html', 'default.htm']}));

var multiparty = require('connect-multiparty');
app.post("/upload",
    multiparty({
        uploadDir:"./tmp",
        maxFilesSize:1 * 1024 * 1024
    }),
    function(req,res){
        res.end("ok..");
    }
);
var http = require('http');
http.createServer(app).listen(app.get('port'), function () {
    console.log('Express server listening on port ' + app.get('port'));
});

html
http://lannisport-nodejs-87124.apne1.nitrousbox.com:3000/connect-multiparty.html

from connect-multiparty.

285858315 avatar 285858315 commented on May 3, 2024
<form name="form1" action="/upload" method="post" enctype="multipart/form-data" >
    <input type="file" name="upload" multiple="multiple">
    <input type="submit" value="submit">
</form>

from connect-multiparty.

285858315 avatar 285858315 commented on May 3, 2024

qq20140524133510

from connect-multiparty.

dougwilson avatar dougwilson commented on May 3, 2024

Please refer to pillarjs/multiparty#69 for the progress on this issue.

from connect-multiparty.

dougwilson avatar dougwilson commented on May 3, 2024

Please try the current master version of this module and tell me if the issue is fixed or not, please. You can install with npm install andrewrk/connect-multiparty

from connect-multiparty.

285858315 avatar 285858315 commented on May 3, 2024

OK,Thanks.

from connect-multiparty.

dougwilson avatar dougwilson commented on May 3, 2024

@285858315 did it work? Any verdict yet?

from connect-multiparty.

dougwilson avatar dougwilson commented on May 3, 2024

Please try version 1.0.4 of this module.

from connect-multiparty.

youxiachai avatar youxiachai commented on May 3, 2024

@dougwilson I test 1.0.4 it work well (limit 2M upload file 100M, not hang request)! thanks fix this bug!

from connect-multiparty.

dougwilson avatar dougwilson commented on May 3, 2024

@youxiachai thank you for confirming this does seems to fix the issue :)

from connect-multiparty.

mryangyu avatar mryangyu commented on May 3, 2024

@dougwilson I am still having this issue in v3.3

using form.on 'file',
and form.on 'error'

something I missed?

currently I'm doing this, but not sure if it's efficient.

form.on 'file', (name, file) -> 
  if file.size > conf.app.upload_size
    return ex.throw new ex.Validation('file is too large'), res

from connect-multiparty.

dougwilson avatar dougwilson commented on May 3, 2024

Hi @mryangyu it's possible it's not the same issue as here. Can you open up a new issue in the repo? I'll be happy to help. If you have any more code to share that would also be helpful :)

If you are talking about events, I think you meant to file the issue in this repo, actually: https://github.com/andrewrk/node-multiparty

Update: I see the code you put and it's probably not correct; I would need to see more, though, but just in a new issue, please :)

from connect-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.