mattdsteele commented on issue #544:
URL: 
https://github.com/apache/cordova-plugin-file/issues/544#issuecomment-1424943783

   @KoushikMahadikar are you working in an Angular project?
   
   We discovered a similar issue in Capacitor's file loader. It appears to be a 
bug in zone.js that causes the `onloadend` method not to make it into the 
`FileReader` class. https://github.com/ionic-team/capacitor/issues/1564
   
   [This 
workaround](https://github.com/ionic-team/capacitor/issues/1564#issuecomment-567857794)
 worked for me:
   
   ```ts
   export function getFileReader(): FileReader {
       const fileReader = new FileReader();
       const zoneOriginalInstance = (fileReader as 
any)["__zone_symbol__originalInstance"];
       return zoneOriginalInstance || fileReader;
   }
   ...
   let newInstance = getFileReader();
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to