wx.cloud.uploadFile可以上传上传网络地址的图片吗?
发布于 2 年前 作者 guochao 10412 次浏览 来自 问答
  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 回复

1、要先download下来再上传;

回到顶部