把图片地址改成http开头的试试
腾讯云存储桶返回的图片用微信无法打开,PC及小程序开发工具都可以打开小程序体验版: https图片地址:https://qcloudtest-1256719351.cos.cn-south.myqcloud.com/1529810400442-Sy_yCt2bQ.jpg PC及开发者工具都可以访问,但就是体验版一直加载不出来,用微信内置浏览器打开也是
2018-07-07我把service/config.js里的appId去掉之后就可以上传图片了
腾讯云wafer2 上传图片错误,代码502将代码部署在腾讯云上后,上传图片失败,服务器的日志如下: warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g: "test-1250000000"). /data/release/node-weapp-demo/node_modules/wafer-node-sdk/lib/upload/index.js:113 const hasBucket = data.Buckets && data.Buckets.reduce((pre, cur) => { ^ TypeError: Cannot read property 'Buckets' of undefined at cos.getService (/data/release/node-weapp-demo/node_modules/wafer-node-sdk/lib/upload/index.js:113:39) at _callback (/data/release/node-weapp-demo/node_modules/cos-nodejs-sdk-v5/sdk/util.js:333:25) at /data/release/node-weapp-demo/node_modules/cos-nodejs-sdk-v5/sdk/base.js:40:20 at cb (/data/release/node-weapp-demo/node_modules/cos-nodejs-sdk-v5/sdk/base.js:2137:13) at Request.<anonymous> (/data/release/node-weapp-demo/node_modules/cos-nodejs-sdk-v5/sdk/base.js:2194:21) at emitOne (events.js:120:20) at Request.emit (events.js:210:7) at IncomingMessage.<anonymous> (/data/release/node-weapp-demo/node_modules/request/request.js:1085:12) at Object.onceWrapper (events.js:314:30) at emitNone (events.js:110:20) at IncomingMessage.emit (events.js:207:7) at endReadableNT (_stream_readable.js:1045:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) 配置如下: [图片] 图片上传的代码用的是demo里的,上传图片后控制台报错:[图片] 图片上传成功时的代码: success: function (res) { //showSuccess('上传图片成功') console.log(res); wx.showToast({ title: "上传图片成功", duration: 800 }) res = JSON.parse(res.data) that.setData({ imgUrl: res.data.imgUrl }) },
2018-07-07我也遇到过这个问题,把config里的appid给去掉就可以了
nodejs 服务端使用cos服务的问题一上传文件就提示以下警告,而使得后续的信道服务停止 warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g: "test-1250000000"). (node:9743) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated. 是在哪里加参数?还有cos在生产环境应该是怎么申请使用?
2018-07-07