thinkjs / thinkjs

Use full ES2015+ features to develop Node.js applications, Support TypeScript.
https://thinkjs.org/
MIT License
5.31k stars 616 forks source link

payload上传多图兼容问题 #969

Closed DoralLee closed 6 years ago

DoralLee commented 6 years ago

multipart/form-data 表单同时上传多张图片的时候this.file()获取到的不是数组而是Object

welefen commented 6 years ago

配置下 multiples 属性

{
  handle: 'payload',
  options: {
    multiples: true
  }
}

并升级 think-payload@1.2.5

welefen commented 6 years ago

https://github.com/thinkjs/think-payload/commit/f1be67cf259e9174eb4962c476d75e910e71a7aa

DoralLee commented 6 years ago

thank you