Skip to content

Commit ba9052d

Browse files
authored
Merge branch 'master' into user/anuverma/windows
2 parents 3b7f53b + a7243ee commit ba9052d

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

android/src/main/java/com/ReactNativeBlobUtil/Response/ReactNativeBlobUtilFileResp.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,19 @@ public MediaType contentType() {
7272

7373
@Override
7474
public long contentLength() {
75-
if (originalBody.contentLength() > Integer.MAX_VALUE) {
75+
76+
/**
77+
*
78+
* Okio buffer issue in current version seems to be fixed in the latest versions
79+
*
80+
* limiting this was causing the download progress to stop at 2GB size but files still was downloading
81+
*
82+
*/
83+
84+
// if (originalBody.contentLength() > Integer.MAX_VALUE) {
7685
// This is a workaround for a bug Okio buffer where it can't handle larger than int.
77-
return Integer.MAX_VALUE;
78-
}
86+
// return Integer.MAX_VALUE;
87+
// }
7988
return originalBody.contentLength();
8089
}
8190

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-blob-util",
3-
"version": "0.21.2",
3+
"version": "0.21.4",
44
"description": "A module provides upload, download, and files access API. Supports file stream read/write for process large files.",
55
"main": "index",
66
"scripts": {

0 commit comments

Comments
 (0)