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

File uploading with more than 2 GB from device is being terminated from device side

    XMLWordPrintableJSON

Details

    Description

      Android cordova FileTransfer.java in upload function is using int data type to keep bytes size of file to be uploaded, it works fine as long file size is less than or equal to 2 GB (i.e. int range 2147483647)

      Problem in FileTransfer.java line 290, and 379: fixedLength = (int) ((FileInputStream)sourceInputStream).getChannel().size() + stringLength;
      Where fixedLength is int and upload fails with 0 bytes.

      Remedy: change fixedLength to long should work.

      Attachments

        Activity

          People

            Unassigned Unassigned
            snawaz Shahid Nawaz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: