Is there any way to make ONE request with multiple upload in IONIC 3? My server side is PHP codeigniter.
this is my code:
upload(){
const fileTransfer: FileTransferObject = this.transfer.create();
var uploadPhoto = JSON.stringify( this.photos );
let options : FileUploadOptions = {
fileKey: 'file',
fileName: 'name.jpg',
headers: {},
params: {
'model': uploadPhoto
}
};
console.log( JSON.stringify( options ) )
fileTransfer.upload(this.photos, encodeURI(this.authService.apiURL + '/serviceupload'), options)
.then(data=> {
console.log( JSON.stringify( data),"data" );
}, (err) => {
// error
})
}
uploadPhoto = []; let options : FileUploadOptions = { fileKey: 'file', fileName: 'name.jpg', headers: {}, mimeType: "image/jpeg", params: { 'model': uploadPhoto, }this.photosvariable?