Home > Mobile >  Small program on video why so slow, really large video upload will not come up, is a question of upl
Small program on video why so slow, really large video upload will not come up, is a question of upl

Time:03-21

Small program to upload video why so slow, large video upload will not come up, is a question of uploadFile?
 
Wx. ChooseVideo ({
MaxDuration: 60,
Compressed: false,
Success: the function (res) {
Var tempFilePath=res. TempFilePath;
Wx. UploadFile ({
Url: 'http://dfsfds',
FilePath: tempFilePath,
Name: 'file',
FormData: {
'folder' : 'test'
},
Header: {
'the content-type:' application/json,
'Authorization' : wx. GetStorageSync (' token ')
},
Success (res) {
Var data=https://bbs.csdn.net/topics/JSON.parse (res) data);
The console. The log (res) data)
If (200) data. Code=={
That the setData ({
Load_video1: data. The data,//material picture
})
} else {
Wx. ShowToast ({
Title: data. MSG,
Icon: "none"
})
}
},
Fail (res) {
Wx. ShowToast ({
Title: res,
Icon: "none"
})
}
})
}
})
  • Related