小程序文件上传

// index.wxml
<view bindtap="upLoadFile">
文件上传
</view>
// index.js
// 文件上传
upLoadFile(res){
// 选择文件
wx.chooseImage({
count: 0,
success: (res) => {
// 上传到云存储
wx.cloud.uploadFile({
cloudPath: "test.png",
filePath: res.tempFilePaths[0],
success: (res) => {
console.log(res)
}
})
}
})
},

小程序文件上传

原文:https://www.cnblogs.com/gmbjzg/p/14619397.html

以上是小程序文件上传的全部内容。
THE END
分享
二维码
< <上一篇
)">
下一篇>>