Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-3409

FileReader.readAsText(string) is deprecated and Broken. Needs to be removed.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.7.0
    • None
    • cordova-android

    Description

      This is an example code:

      function readMyFile() {
          var filename = "testFile.txt";
          var objFile = new FileReader();
          objFile.onloadend = function(e) {
              console.log("Result: " + JSON.stringify(e));
          }
         objFile.readAsText(filename);
      
      }
      

      Collback function returns error:

      e.target.error.code = "JSON error"

      Attachments

        Activity

          People

            agrieve Andrew Grieve
            fspezi Flavio Spezi
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: