This repository was archived by the owner on Mar 16, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ const RNFetchBlob:RNFetchBlobNative = NativeModules.RNFetchBlob
18
18
* @param {string } scheme URI scheme that needs to support, optional
19
19
* @return {Promise }
20
20
*/
21
- function openDocument ( path :string , scheme :string ) {
21
+ function previewDocument ( path :string , scheme :string ) {
22
22
if ( Platform . OS === 'ios' )
23
- return RNFetchBlob . openDocument ( 'file://' + path , scheme )
23
+ return RNFetchBlob . previewDocument ( 'file://' + path , scheme )
24
24
else
25
25
return Promise . reject ( 'RNFetchBlob.openDocument only supports IOS.' )
26
26
}
@@ -31,9 +31,9 @@ function openDocument(path:string, scheme:string) {
31
31
* @param {string } scheme URI scheme that needs to support, optional
32
32
* @return {Promise }
33
33
*/
34
- function previewDocument ( path :string , scheme :string ) {
34
+ function openDocument ( path :string , scheme :string ) {
35
35
if ( Platform . OS === 'ios' )
36
- return RNFetchBlob . previewDocument ( 'file://' + path , scheme )
36
+ return RNFetchBlob . openDocument ( 'file://' + path , scheme )
37
37
else
38
38
return Promise . reject ( 'RNFetchBlob.previewDocument only supports IOS.' )
39
39
}
Original file line number Diff line number Diff line change @@ -438,7 +438,7 @@ - (NSDictionary *)constantsToExport
438
438
[RNFetchBlobFS slice: src dest: dest start: start end: end encode: @" " resolver: resolve rejecter: reject];
439
439
})
440
440
441
- RCT_EXPORT_METHOD (openDocument :(NSString *)uri scheme:(NSString *)scheme resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject
441
+ RCT_EXPORT_METHOD (previewDocument :(NSString *)uri scheme:(NSString *)scheme resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject
442
442
{
443
443
444
444
NSURL * url = [[NSURL alloc ] initWithString: uri];
@@ -455,7 +455,7 @@ - (NSDictionary *)constantsToExport
455
455
456
456
# pragma mark - open file with UIDocumentInteractionController and delegate
457
457
458
- RCT_EXPORT_METHOD (previewDocument :(NSString *)uri scheme:(NSString *)scheme resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject
458
+ RCT_EXPORT_METHOD (openDocument :(NSString *)uri scheme:(NSString *)scheme resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject
459
459
{
460
460
461
461
NSURL * url = [[NSURL alloc ] initWithString: uri];
You can’t perform that action at this time.
0 commit comments