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

File plugin on Windows reads entire file into memory when only a small fragment is requested on `readAsBinaryString`

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 6.5.0
    • Fix Version/s: None
    • Component/s: cordova-plugin-file
    • Labels:
      None
    • Environment:

      All Windows UAP applications

      Description

      `readAsBinaryString` for `FileReader` on Windows is reading the entire file to a buffer then slicing the requested fragment causing the app to crash due to out of memory errors. It should instead be using a stream which seeks to the requested start position and only reads the requested length.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              salbahra Samer Albahra
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 40m
                40m