I’m running the following code with Ionic Native File Plugin:
accessFile(path, fileName) {
return this.file.readAsDataURL(path, fileName).then((result) => {
return result;
}).catch(err => console.log('readAsDataURL Error', JSON.stringify(err)));
}
I’m getting this error:
readAsDataURL Error {“code”:5,“message”:“ENCODING_ERR”}
I’m using WKWebView and here’s my Ionic Info:
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
cordova (Cordova CLI) : 7.1.0
@ionic/app-scripts : 1.3.12
Cordova Platforms : ios 4.5.4
Ionic Framework : ionic-angular 3.9.2
ios-deploy : 1.9.2
Node : v8.11.1
npm : 5.6.0
OS : macOS High Sierra
Xcode : Xcode 9.4.1 Build version 9F2000
Working on iOS.
I’ve tried the Path with file:///
and without it, both ways still give the same error.
My Path looks like this:
file:///private/var/mobile/Containers/Data/Application/E9…D/tmp/
Any ideas?