fm = wx.getFileSystemManager()
wx.chooseVideo({
sourceType: ['album', 'camera'],
maxDuration: 60,
camera: 'back',
compressed:false,
success: function(res) {
var filePath = res.tempFilePath
fm.unlink({
filePath:filePath ,
success:function(e){
console.log('删除成功');
},fail:function(e){
console.log(e)
}
})
},fail:function(e){
console.log('选择视频失败');
}
})
苹果手机删除文件提示无权限,安卓手机可以正常删除
调用FileSystemManager.saveFile以后再调用FileSystemManager.unlink删除具体参考此贴https://developers.weixin.qq.com/community/develop/doc/0006ccabe504605fb33b4c9235bc00