请问下各位前辈,uploadFile上传文件失败,服务器上接收不到文件,这是怎么回事呢。
uploadFile:fail createUploadTask:fail file not found
一直报这个错误。求帮忙
这个问题解决了么,我也出现了这样的问题
你传的filePath对应的文件不存在
你好,你可以试试打开手机调试,在进行测试,看是否能正常运行。
请问解决了吗,怎么解决的
我的域名,和uploadfile域名都配置了,但是还是报uploadFile:fail createUploadTask:fail url not in domain list这个错误,手机调试模式没问题
filePath接受真实string路径, 写个循环
res.tempFilePaths.map((path,index)=>{
wx.uploadFile({ //上传图片到服务器
url:url
filePath:path, //filePath接受真实string路径,只能写个循环了
name: ‘file’,
formData: {token:_this.$store.state.user.token} ,
success:(res)=>{console.dir(res)},
fail:(err)=>{console.dir(err)}
})