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

Fix: multiple files upload #122

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

billchenchina
Copy link

Fix bug since koa#952

upload/app.js Outdated
reader.pipe(stream);
console.log('uploading %s -> %s', file.name, stream.path);
const files = ctx.request.body.files.file;
if (files instanceof Array) {
Copy link

@fl0w fl0w May 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd go with Array.isArray here, even better would be to not special-case and DRY streaming (e.g. always assume arrays).

@billchenchina
Copy link
Author

Then? @fl0w

Copy link
Member

@3imed-jaberi 3imed-jaberi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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

Successfully merging this pull request may close these issues.

3 participants