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

FileReader example code is incorrect

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.9.0
    • None
    • None
    • None

    Description

      In the File API guide it seems almost all of the FileReader example code is incorrect for the error callbacks.

      For example,

      • readAsDataURL QuickExample - evt should be error?
      var fail = function (evt) {
          console.log(error.code);
      };
      
      • readAsText Quick Example - evt should be error?
      var fail = function (evt) {
          console.log(error.code);
      };
      
      • readAsText Full example - evt arg should be error? console.log(evt.target.error.code) should be console.log(error.code)?
      function fail(evt) {
          console.log(evt.target.error.code);
      }
      
      • readAsBinaryString - evt should be error?
      var fail = function (evt) {
          console.log(error.code);
      };
      
      • readAsArrayBuffer - evt should be error?
      var fail = function (evt) {
          console.log(error.code);
      };
      

      Attachments

        Activity

          People

            mwbrooks Michael William Brooks
            dinglemouse Peter
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: