Halo
I want to get directory after i get file by file picker on ios
and i got error like this :
this is my code :
this.filePicker.pickFile().then(uri => {
console.log(uri);
this.file.resolveDirectoryUrl(uri).then((response: any) => {
console.log(response)
response.file((file) => {
var maxSize = 1048576 * 2;
var size = file.size;
var sizeCheck = size < maxSize;
if (sizeCheck == false) {
this.service.showAlert('Warning', 'Failed, Max file size is 2 Mb');
} else {
console.log(file)
}
})
}).catch(e => console.log(e));
and this is my ionic info:
Ionic:
Ionic CLI : 5.4.16 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.5
@ionic/app-scripts : 3.2.2
Cordova:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : ios 5.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 17 other plugins)
Utility:
cordova-res (update available: 0.9.0) : 0.8.1
native-run (update available: 0.3.0) : 0.2.9
System:
ios-sim : 8.0.2
NodeJS : v12.16.1 (/usr/local/bin/node)
npm : 6.13.4
OS : macOS Catalina
Xcode : Xcode 11.3.1 Build version 11C504
Thank you for helping