- 请问为什么wx.uploadFile无法获取UploadTask对象进行中断上传请求?
const uploadTask = wx.uploadFile({ url: 'http://example.weixin.qq.com/upload', //仅为示例,非真实的接口地址 filePath: tempFilePaths[0], name: 'file', formData:{ 'user': 'test' }, success (res){ const data = res.data //do something } }) uploadTask.onProgressUpdate((res) => { console.log('上传进度', res.progress) console.log('已经上传的数据长度', res.totalBytesSent) console.log('预期需要上传的数据总长度', res.totalBytesExpectedToSend) }) uploadTask.abort() // 取消上传任务 按照官方文档的写,uploadTask对象打印的值为undefined,报错:TypeError: Cannot read properties of undefined (reading 'abort')
04-30 - 请问微信小程序在QQ打开后,wx.compressVideo报错不支持有办法解决吗?
在qq打开后操作时报错:compressVideo: fail not supported
04-11 - 请问为什么canvasToTempFilePath报错画布为空?
原本是没问题的,已经一个月快没更新线上版本了,这个API昨天开始报错:"canvasToTempFilePath:fail fail canvas is empty" context.draw(true, setTimeout(() => { uni.canvasToTempFilePath({ canvasId: 'canvas', fileType: 'jpg', success: (res) => { resolve(res.tempFilePath); }, fail: (err) => { console.log('错误',err) } },this) }, 1000));
03-17 - 请问微信小程序wx.uploadFile报错errno: 600001有人解决过吗?
{errno: 600001, errMsg: "uploadFile:fail errcode:-101 cronet_error_code:-10001 error_msg:net::ERR_CONNECTION_RESET} 部分用户偶尔会出现这个问题,放置了上传进度条。上传进度非常慢,到达80%左右时上传进度归零,重新开始上传,直至报错。 切换网络后重试,调整过请求超时时间等解决方法,都没有作用。
2024-09-19 - cover-view在ios和android使用touchmove会抖动,请问有什么解决方案吗?
使用场景是在web-view中实现自定义滑动选择器,除cover-view以外都实现不了
2024-09-10