[
https://issues.apache.org/jira/browse/CB-13743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Darryl Pogue updated CB-13743:
------------------------------
Component/s: Ionic
> Adding this plugin breaks all instances of FileReader's already existing
> within an ionic project when deployed on Android (work on web)
> ---------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CB-13743
> URL: https://issues.apache.org/jira/browse/CB-13743
> Project: Apache Cordova
> Issue Type: Bug
> Components: Ionic
> Environment: Android 6.0.0
> Reporter: Jonathan Kelsey
> Priority: Major
>
> By adding the following to an ionic project:
> In the package.json
> + "@ionic-native/media-capture": "^4.5.2",
> In the config.xml
> + <plugin name="cordova-plugin-media-capture" spec="^3.0.1" />
> After this a code sample like this:
> {code:javascript}
> var result = null;
> var reader = new FileReader();
> reader.onloadend = function (encodedFile: any) {
> result = encodedFile.target.result;
> };
> reader.onerror = function() {
> console.error("some error with reader")
> };
> reader.readAsDataURL(file);
> {code}
> or another example:
> {code:javascript}
> var result = null;
> var reader = new FileReader();
> reader.onload = function() {
> result=reader.result;
> };
> reader.onerror = function() {
> console.error("some error with reader")
> };
> //reader.readAsDataURL(file);
> //reader.readAsBinaryString(file);
> reader.readAsArrayBuffer(file)
> {code}
> In all cases result is not defined. No errors are emitted.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]