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

上传图片后名称不对有3.x上传的demo吗 #970

Closed lengyehan closed 6 years ago

lengyehan commented 6 years ago

DESC

ENV

image

OS Platform:

Node.js Version:6.x

ThinkJS Version:3.x

code

// your code here
![image](https://user-images.githubusercontent.com/8751342/33115676-cc3ecd5e-cf9c-11e7-9f76-687db6186ff7.png)

error message

// your error message here

more description

// your detail description 上传后文件重新命名后缀没了

welefen commented 6 years ago

中间件 payload 有参数配置(src/config/middleware.js),如:

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

更多配置参数见 https://github.com/thinkjs/think-payload