hi everybody, I want to upload 2 image file with fileTranfer and 1 input, but FileTranfer only uploads 1 image.
this is my code:
updateLicense1(){
const fileTransfer: FileTransferObject = this.transfer.create();
let headers = new Headers();
let token = JSON.parse(localStorage.getItem('user'));
headers.append('Authorization', token.token);
let options: FileUploadOptions = {
fileKey: 'file',
fileName: "myImage.jpg",
chunkedMode: false,
httpMethod: 'post',
mimeType: "multipart/form-data",
headers: headers,
params : {
'evidenceOfOwnership' : this.evidenceOfOwnership,
'license1' : this.base64Image,
'license2' : this.base64Image2
}
}
fileTransfer.upload(this.base64Image && this.base64Image2 , url, options)
.then((data) => {
console.log('ok');
}, (err) => {
console.log(err);
})
What should I do?? Can you help me, please!!