File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -3,16 +3,20 @@ import {URL as whatwgUrl} from 'whatwg-url-without-unicode';
3
3
4
4
let BLOB_URL_PREFIX = null ;
5
5
6
- const { BlobModule } = NativeModules ;
6
+ const NativeBlobModule = NativeModules . BlobModule ;
7
7
8
- if ( BlobModule && typeof BlobModule . BLOB_URI_SCHEME === 'string' ) {
9
- BLOB_URL_PREFIX = BlobModule . BLOB_URI_SCHEME + ':' ;
10
- if ( typeof BlobModule . BLOB_URI_HOST === 'string' ) {
11
- BLOB_URL_PREFIX += `//${ BlobModule . BLOB_URI_HOST } /` ;
8
+ if (
9
+ NativeBlobModule &&
10
+ typeof NativeBlobModule . getConstants ( ) . BLOB_URI_SCHEME === 'string'
11
+ ) {
12
+ const constants = NativeBlobModule . getConstants ( ) ;
13
+ BLOB_URL_PREFIX = constants . BLOB_URI_SCHEME + ':' ;
14
+ if ( typeof constants . BLOB_URI_HOST === 'string' ) {
15
+ BLOB_URL_PREFIX += `//${ constants . BLOB_URI_HOST } /` ;
12
16
}
13
17
}
14
18
15
- /**
19
+ /*
16
20
* To allow Blobs be accessed via `content://` URIs,
17
21
* you need to register `BlobProvider` as a ContentProvider in your app's `AndroidManifest.xml`:
18
22
*
You can’t perform that action at this time.
0 commit comments