downloadFile:fail savefile: fail the maximum size of the file storage limit is exceeded
真机下载视频 总是下载失败?downvideo(e) { this.setData({ downurl: e.currentTarget.dataset.url }) wx.getSetting({ success: (res) => { if (!res.authSetting['scope.writePhotosAlbum']) { wx.authorize({ scope: 'scope.writePhotosAlbum', success: () => { this.startDownload(); }, fail: () => { wx.showModal({ title: '提示', content: '需要您授权保存到相册才能下载视频', success: (res) => { if (res.confirm) { wx.openSetting(); } } }); } }); } else { this.startDownload(); } } }); }, startDownload() { wx.showLoading({ title: '正在下载', mask: true }) let filepath = wx.env.USER_DATA_PATH + '/' + new Date().valueOf() + '.mp4' wx.downloadFile({ url: this.data.downurl, filePath: filepath,//指定文件下载后存储的路径 success: (res) => { if (res.statusCode === 200) { console.log(res,2222) wx.saveVideoToPhotosAlbum({ filePath: res.filePath, success: () => { wx.hideLoading(); wx.showToast({ title: '下载成功', icon: 'success' }); }, fail: (err) => { wx.hideLoading(); wx.showToast({ title: '保存失败', icon: 'none' }); console.error('保存视频失败:', err); } }); } else { wx.hideLoading(); wx.showToast({ title: '下载失败', icon: 'none' }); console.error('下载视频失败,状态码:', res.statusCode); } }, fail: (err) => { console.log(err,11111) wx.showToast({ title: '下载失败', icon: 'none' }); console.error('下载视频出错:', err); } }); },
04-14每次反馈的问题 都不同
小程序审核不通过?[图片] [图片][图片]看到这个 大家能嘲讽一波么? [图片] 这得等多久
2024-04-09