Skip to content
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

posting multiple files works, posting only one file does not #354

Closed
adampaulukanis opened this issue Oct 14, 2015 · 2 comments
Closed

posting multiple files works, posting only one file does not #354

adampaulukanis opened this issue Oct 14, 2015 · 2 comments

Comments

@adampaulukanis
Copy link

Hello. I am a beginner. Please be polite ;-)

var form = new formidable.IncomingForm();
form.multiples = true;

I expect this >> files.upload << in form.parse to work, and it does, when I try to upload more than one file at a time. Unfortunatly it does not work, if I have chosen only one file.

Could someone help me with this?

I work around this by checking if this is an array, if not, copy one file, else if an array, use loop to do that.

Thank you very much in advance.

Have a good day all.

@tunnckoCore
Copy link
Member

tunnckoCore commented Jan 16, 2017

Actually yea, I think you are correct. And as already seen issue #400 , it is uncomfortable to have different type. It would be better to be always an array even if only one file is uploaded.

@tunnckoCore
Copy link
Member

Maybe #315 is fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants