You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "dharmendra sharma (JIRA)" <ji...@apache.org> on 2016/03/03 06:58:18 UTC

[jira] [Commented] (CB-4274) File uploading with more than 2 GB from device is being terminated from device side

    [ https://issues.apache.org/jira/browse/CB-4274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15177276#comment-15177276 ] 

dharmendra sharma commented on CB-4274:
---------------------------------------

Uploading 2 GB is not a usual scenario I believe.
 Is this issue still there in latest version ?

> File uploading with more than 2 GB from device is being terminated from device side
> -----------------------------------------------------------------------------------
>
>                 Key: CB-4274
>                 URL: https://issues.apache.org/jira/browse/CB-4274
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File Transfer
>            Reporter: Shahid Nawaz
>            Priority: Minor
>              Labels: Android
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org