File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
android/src/main/java/com/RNFetchBlob/Utils Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -46,9 +46,18 @@ else if (isDownloadsDocument(uri)) {
46
46
String path = rawuri .getPath ();
47
47
return path ;
48
48
}
49
+
50
+ String docId = null ;
51
+ //Since Android 10, uri can start with msf scheme like "msf:12345"
52
+ if (id != null && id .startsWith ("msf:" )) {
53
+ final String [] split = id .split (":" );
54
+ docId = Long .valueOf (split [1 ]);
55
+ } else {
56
+ docId = Long .valueOf (id );
57
+ }
58
+
49
59
final Uri contentUri = ContentUris .withAppendedId (
50
- Uri .parse ("content://downloads/public_downloads" ), Long .valueOf (id ));
51
-
60
+ Uri .parse ("content://downloads/public_downloads" ), docId );
52
61
return getDataColumn (context , contentUri , null , null );
53
62
}
54
63
catch (Exception ex ) {
@@ -212,4 +221,4 @@ public static boolean isGooglePhotosUri(Uri uri) {
212
221
return "com.google.android.apps.photos.content" .equals (uri .getAuthority ());
213
222
}
214
223
215
- }
224
+ }
You can’t perform that action at this time.
0 commit comments