I am using this plugin to upload files from my ios device:
https://github.com/jcesarmobile/FilePicker-Phonegap-iOS-Plugin
this is my code:
uploadResume(){
var self = this;
let utis = ["public.data"]
// test
if (this.platform.is('ios')) {
FilePicker.pickFile(
function (uri) {
let correctPath = uri.substr(0, uri.lastIndexOf('/') + 1);
let currentName = uri.substring(uri.lastIndexOf('/') + 1);
console.log(correctPath);
console.log(currentName);
},
function (error) {
console.log("File error : ", error)
}
,
function (utis) {
console.log('UTIS', this.utis)
}
)
}
else{}
}
and at the top of my class I have the FilePicker declared.
declare var FilePicker: any;
@IonicPage()
@Component({
selector: 'page-resume',
templateUrl: 'resume.html',
})
export class ResumePage {
But its not working, nothing happens when I run it on the device. How do I fix this ?