uni-app开发过程中,发现上传功能在小程序端报错:uploadFile:failparametererror:parameter.filePat…meter.nameshouldbeStringinsteadofUndefined。查看uni.uploadFile(options)文档,是在传输参数格式出现了错误。按照官方文档配置如下即可:uni.chooseImage({ count:1,//count值在H5平台的表现,基于浏览器本身的规范。目前测试的结果来看,只能限制单选/多选,并不能限制数量。并且,在实际的手机浏览器很少有能够支持多选的。 sizeType:'compressed'