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

wx.uploadFile上传时formData丢失?

上传请求发出后,后端没有收到formData里填写的字段

const uploadTask = wx.uploadFile({
        url: cosBucketMap[tmpFile.cate],
        filePath: tmpFile.file,
        name: 'file',
        timeout,
        formData: {
          'key': tmpFile.new_name,
          'success_action_status': 200,
          'Signature': cos_config.Authorization,
          'x-cos-security-token': cos_config.XCosSecurityToken,
          'Content-Type': '',
        },
        success: function(res) {},
        fail: function(res) {},
});


网友回复

微喵网络:

叫后端把所有接收到的参数打印出来

Mr.Zhao:

后台谁写的?

评论 抢沙发

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

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

云免签H5支付