Skip to content

Commit a3d0f72

Browse files
authored
fix(android): support picking 2+ GB files (#604)
1 parent 1e6ddde commit a3d0f72

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

android/src/main/java/com/reactnativedocumentpicker/DocumentPickerModule.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,10 @@ private WritableMap getMetadata(Uri uri) {
275275
map.putString(FIELD_TYPE, cursor.getString(mimeIndex));
276276
}
277277
int sizeIndex = cursor.getColumnIndex(OpenableColumns.SIZE);
278-
if (!cursor.isNull(sizeIndex)) {
279-
map.putInt(FIELD_SIZE, cursor.getInt(sizeIndex));
280-
} else {
278+
if (cursor.isNull(sizeIndex)) {
281279
map.putNull(FIELD_SIZE);
280+
} else {
281+
map.putDouble(FIELD_SIZE, cursor.getLong(sizeIndex));
282282
}
283283
}
284284
}

0 commit comments

Comments
 (0)