Olabosipo Shoroye created CB-12827:
--------------------------------------
Summary: readAsText and readAsDataURL error
Key: CB-12827
URL: https://issues.apache.org/jira/browse/CB-12827
Project: Apache Cordova
Issue Type: Bug
Components: cordova-plugin-file, Ionic
Affects Versions: 6.4.0
Environment: Android KitKat 4.4.2
Reporter: Olabosipo Shoroye
I'm using ngCordova cordova-plugin-file to try to read an image that I then
want to convert to bytes. I actually want to read it as dataURL and I'm getting
an error.
/* The image is located at
file:///data/data/com.xxx.housekeeping/cache/tmp_Screenshot_2017-04-27-09-30-42-1816635709.png
on an Android device */
`$cordovaFile.readAsText(cordova.file.cache,
"tmp_Screenshot_2017-04-27-09-30-421403920141.png")
.then(function (success) {
// success
console.log(success);
}, function (error) {
// error
console.log(error);
});`
I tried using both readAsText and readAsDataURL but I get
`Wrong type for parameter "uri" of resolveLocalFileSystemURI: Expected String,
but got Undefined.`
as an error. This is on an Android device.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]