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

FileReader.READ_CHUNK_SIZE is not working with Base64 conversion

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.2.0
    • None
    • cordova-plugin-file
    • Bug in JavaScript so all platforms will be affected

    Description

      CB-7862 - the fix for reading files in chunks defined the chunk size as follow:
      FileReader.READ_CHUNK_SIZE = 256*1024;

      I found a bug on iOS that readAsDataURL in CDVFile.m, converting it to Base64 will not work because the chunk size 262144 is not dividable by 3.

      The quick fix will be FileReader.READ_CHUNK_SIZE = (256*1024) - 1

      Attachments

        Issue Links

          Activity

            People

              vladimir.kotikov Vladimir Kotikov
              tl274n Tony Leung
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: