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

Unable to read android_asset directory through File API

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.0
    • Fix Version/s: None
    • Component/s: cordova-plugin-file
    • Labels:
    • Environment:

      Android 4.4.2 / Samsung Galaxy S4

      Description

      Attempting to read the 'android_asset' folder through the File API results in Error Code 5 (FileError.ENCODING_ERR). I've tried accessing via resolveLocalFileSystemURL, and by creating a directory reader and calling readEntries().

      window.resolveLocalFileSystemURL('file:///android_asset/www/my_asset_folder', success, fail);

      var sourceDir = new DirectoryEntry(

      { fullPath: 'file:///android_asset/www/my_asset_folder' }

      );
      var reader = sourceDir.createReader();
      reader.readEntries(success, fail);

      (I have also tried with the URLs being '/android_asset/www/my_asset_folder'; same result)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                agrieve Andrew Grieve
                Reporter:
                mattgrande Matt Grande
              • Votes:
                1 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: