代码是微信复制过来的,微信俩中写法都是可以

  header: {                'Content-Type': 'application/x-www-form-urlencoded',                // 'content-Type': 'application/json',    },

支付宝只能写   ‘Content-Type’: ‘application/x-www-form-urlencoded’,

my.uploadFile({  url: '请使用自己服务器地址',  fileType: 'image',  fileName: 'file',  filePath: '...',     header: {                'Content-Type': 'application/x-www-form-urlencoded',    },  success: (res) = {    my.alert({  content: '上传成功'});  },});

TAG标签: 微信小程序uploadfile

http://www.xiaochengxub.com/read-104349.html