我想使用表单数据上传图片。当我上传一张图片时,图片已成功上传,但当我附加多张图片时,它不会附加。并且没有数据传递到服务器。
var data = new FormData();
data.append('imagea',arr[0].uri);//if I append only one image it will get uploaded
data.append('imageb',arr[1].uri);//When I try to append another image it wont append
var xhr = new XMLHttpRequest();
xhr.open('POST', 'http://192.168.169.188/classifiedad/AdvertisementSvc.svc/NewAdvertisement', true);
xhr.onload = function () {
console.log(this.responseText);
};
xhr.send(data);