云函数中图片上传,调用了fs.createReadStream(filepath),能读取云函数目录中的图片,换成wx.chooseimage中自动选择的路径就出错:readStream = fs.createReadStream(__dirname+'/IMG_2472.JPG'); 换成=〉 var readStream = fs.createReadStream(filepath);
发生异常: { [Error: ENOENT: no such file or directory, open http://tmp/OdK3pwDXqzMEed292db2562ea048ff0c62e5dac742dd.jpg']原代码如下:求高手指教!!
临时文件在你手机上,tmp相当于localhost域名,映射你本机的,云函数在腾讯云上,怎么能访问通呢,就算能访问通,这个api也不支持网络地址
type: image/jpeg
size: 1603548
files: (binary)}