I am using Image Picker plugin and I want to get some images and upload them.
I have the following code:
filesToUpload: Array<File>;
selectImages() {
ImagePicker.getPictures(this.options).then((results) => {
this.items = results;
for (var i = 0; i < results.length; i++) {
console.log('Image URI: ' + results[i]);
var fil: File = new File(results[i]);
}
}, (err) => {
});
}
new File(results[i]); gives error.
Anyone knows how to do this?