请求返回值为400
来源:5-20 上传头像后更新到数据库
qq_慕莱坞7377727
2020-01-28
wx.uploadFile({
url: serverUrl + ‘/user/uploadFace?userID=’+app.userInfo.id, //上传接口地址
filePath: tempFilePaths[0],
name: ‘file’,
header:{
‘content-type’: ‘application/json’ // 默认值
}
JAVA
public String uploadFace(Integer userID,
@RequestParam(“file”) MultipartFile[] files) throws Exception {
写回答
1回答
-
400说明请求有问题,打断点看看哪里是否有undefined
10