-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
set maxFilesSize can't response error #5
Comments
I added a test for this, but the test passes. Can you provide a test case that demonstrates your problem? |
if file small ,it will work well,but large file will hang request,although it throw error |
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. |
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 |
<form name="form1" action="/upload" method="post" enctype="multipart/form-data" >
<input type="file" name="upload" multiple="multiple">
<input type="submit" value="submit">
</form> |
Please refer to pillarjs/multiparty#69 for the progress on this issue. |
Please try the current |
OK,Thanks. |
@285858315 did it work? Any verdict yet? |
Please try version 1.0.4 of this module. |
@dougwilson I test 1.0.4 it work well (limit 2M upload file 100M, not hang request)! thanks fix this bug! |
@youxiachai thank you for confirming this does seems to fix the issue :) |
@dougwilson I am still having this issue in v3.3 using form.on 'file', something I missed? currently I'm doing this, but not sure if it's efficient.
|
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 :) |
I found if set
if I upload more than 1 MB(but work ~40KB) size file ,It will throw err in console, but it will not send response !!
so browser will hang request !!
The text was updated successfully, but these errors were encountered: