-
-
Notifications
You must be signed in to change notification settings - Fork 680
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
Adding support for multiple files coming from a single input #115
Conversation
…put type=file id=files name=files multiple />
Ar workaround you can set form.on('file', function(){}) |
Thanks thats handy to know |
Nothing wrong. I just wrote an workaround till the author will correct the error. |
Connect's bodyParser does this, it doesn't necessarily have to be in the lib but it would be nice to have the option (like parted does now) |
Yes, already checked for this issue! |
Needs a test case. |
@aaronSig Any news? |
still needs a test case. |
This should really get fixed! |
+1. confusing result |
What's the status of this fix? I'm writing an O'Reilly book on Express, and I'm recommending Formidable over Busboy because of the convenience of getting the fileds/files objects in the callback...it would be nice to be able to tell my readers that multiple file uploads for the same field are supported, but it looks like this hasn't been touched for 5-9 months...? |
The usual. Lots of people saying it's important, nobody bothering to do the work.
They are supported. You just have to use the event based API. --fg |
Heh. Yes, that is the usual problem with open source. Well, I would love to to fix it myself, but I don't fully understand what the problem is: the fix that aaron Sig submitted seems solid...the problem is that that the tests aren't passing? If that's the issue, I'll pull aaron's commit and find out why it's borking the tests and try to get this working, unless you know some reason I shouldn't. Yes, I'm aware that multi-file uploads are supported through the events-based API, but I like the simplicity of the "files" object on the callback. And, when it comes to writing a book, well, page real estate is limited, and I have a lot of ground to cover.... Also, it's one of the main reasons I picked Formidable over Busboy. |
I forked master, and applied a slightly neater version of aaron Sig's patch. I see that it does indeed break the legacy tests, line 226 in It fails because If it were my project, I would probably correct the test...but this may be one reason I'm not running any major open source projects! I want to do the right thing and not break functionality for people depending on this package. I would like a little guidance here: I'm happy to do the work, but I want to do it the right way. |
@Jammerwoch I think @felixge's point is that if we merge this PR as-is, it changes the default behavior which could break some people's existing apps if they depend on this default behavior as-is. That's what the failed test case reflects. I agree with you that we should probably just change the default behavior eventually, but it's generally considered polite to bump the version to a new major number (2.x in this case) to indicate that we have altered default behavior. Given that, it seems that his suggestion to hide it behind a feature switch is the best way to go for now, although I would also be in support of a 2.0 release which makes this the default behavior in the future. To that end, I have submitted a fresh PR which refactors this one somewhat and implements it using a feature switch instead that should hopefully satisfy all of @felixge's (reasonable) objections to this PR as it is currently written. Have a look here: #272 Additional feedback and suggestions are of course welcome. Would love to see this issue resolved. |
e.g.