wx.cloud.uploadFile可以上传上传网络地址的图片吗?

发布于 4 年前作者 guochao10708 次浏览最后编辑 4 年前来自 ask
  wx.cloud.uploadFile({
                cloudPath:`tmp/${fileName}`,//可以不写后缀,会自动创建到云储存中
                filePath:that.data.fileUrl,
            }).then(res => {
                that.setData({
                    filePath:res.fileID
                })
           })
           .catch(error => {
               debugger
               console.log(error)
               wx.showToast({ title: '失败,请重试', icon: 'loading' })
           })
1 回复
jingyao
jingyao1 楼6 个月前

1、要先download下来再上传;