我正在尝试使用ng2-file-upload
从多个文件的列表中上传单个文件。但是,只有我尝试上传的第一个文件才被实际上传。我该如何解决这个问题?谢谢。
singleUpload(fileName, item) {
this.http.post('http://localhost:8080/api/profile/uploadDocument', {
photo_image: fileName,
user_id: this.userid
}).subscribe(res => {
console.log(fileName);
this.uploader.uploadItem(item); // it only uploads file to sever once
popupS.alert({
title: 'Feedback',
content: '<br><hr><div align="center">' + fileName + ' has been <br>
Uploaded < /div><hr><br>'
});
});
}