uni.chooseImage({
count: 1,
success: res => {
const tempFilePaths = res.tempFilePaths
uni.uploadFile({
url: 'https://api.zzgoodqc.cn/api/upload',
filePath: tempFilePaths[0],
name: 'file',
success: res => {
console.log('upload success', res)
},
fail: err => {
console.log('upload fail', err)
}
})
}
})
file 流