html52.com
我爱小程序-开发者交流社区

wx.uploadFile中的url是什么?后端接口吗?

框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
小程序 Bug wx.uploadFile 微信iOS客户端 8.0.9 2.16.1

https://developers.weixin.qq.com/miniprogram/dev/api/network/upload/wx.uploadFile.html

wx.chooseImage({
  success (res) {
    const tempFilePaths = res.tempFilePaths
    wx.uploadFile({
      url: 'https://example.weixin.qq.com/upload', //仅为示例,非真实的接口地址
      filePath: tempFilePaths[0],
      name: 'file',
      formData: {
        'user': 'test'
      },
      success (res){
        const data = res.data
        //do something
      }
    })
  }
})


网友回复

ωǎnɡ:

是的

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付