小程式上傳視頻為啥那么慢,大點的視頻上傳不上去,是uploadFile的問題?
wx.chooseVideo({
maxDuration: 60,
compressed: false,
success: function(res) {
var tempFilePath = res.tempFilePath;
wx.uploadFile({
url: 'http://dfsfds',
filePath: tempFilePath,
name: 'file',
formData: {
'folder': 'test'
},
header: {
'content-type': 'application/json',
'Authorization': wx.getStorageSync('token')
},
success(res) {
var data = JSON.parse(res.data);
console.log(res.data)
if(data.code==200){
that.setData({
load_video1: data.data, //素材圖片
})
}else{
wx.showToast({
title: data.msg,
icon: "none"
})
}
},
fail(res){
wx.showToast({
title: res,
icon: "none"
})
}
})
}
})
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/269097.html
標籤:微信開發
下一篇:JAVA同集合怎樣比較去重?
