Skip to content

Conversation

@jonnynfb
Copy link
Contributor

@jonnynfb jonnynfb commented Nov 15, 2018

On Android downloadFile will get overflown and contentLength return -1 if downloading large size file over 3GB.
I switched to use long instead of int; and using getContentLengthLong instead of getContentLength to support big file size.

The content length of the resource that this connection's URL references, -1 if the content length is not known, or if the content length is greater than Integer.MAX_VALUE.
https://docs.oracle.com/javase/7/docs/api/java/net/URLConnection.html#getContentLength()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants