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
1818 * @param {string } scheme URI scheme that needs to support, optional
1919 * @return {Promise }
2020 */
21- function openDocument ( path :string , scheme :string ) {
21+ function previewDocument ( path :string , scheme :string ) {
2222 if ( Platform . OS === 'ios' )
23- return RNFetchBlob . openDocument ( 'file://' + path , scheme )
23+ return RNFetchBlob . previewDocument ( 'file://' + path , scheme )
2424 else
2525 return Promise . reject ( 'RNFetchBlob.openDocument only supports IOS.' )
2626}
@@ -31,9 +31,9 @@ function openDocument(path:string, scheme:string) {
3131 * @param {string } scheme URI scheme that needs to support, optional
3232 * @return {Promise }
3333 */
34- function previewDocument ( path :string , scheme :string ) {
34+ function openDocument ( path :string , scheme :string ) {
3535 if ( Platform . OS === 'ios' )
36- return RNFetchBlob . previewDocument ( 'file://' + path , scheme )
36+ return RNFetchBlob . openDocument ( 'file://' + path , scheme )
3737 else
3838 return Promise . reject ( 'RNFetchBlob.previewDocument only supports IOS.' )
3939}
Original file line number Diff line number Diff line change @@ -438,7 +438,7 @@ - (NSDictionary *)constantsToExport
438438 [RNFetchBlobFS slice: src dest: dest start: start end: end encode: @" " resolver: resolve rejecter: reject];
439439})
440440
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
442442{
443443
444444 NSURL * url = [[NSURL alloc ] initWithString: uri];
@@ -455,7 +455,7 @@ - (NSDictionary *)constantsToExport
455455
456456# pragma mark - open file with UIDocumentInteractionController and delegate
457457
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
459459{
460460
461461 NSURL * url = [[NSURL alloc ] initWithString: uri];
You can’t perform that action at this time.
0 commit comments