From aa63a011714d02a61a67ae5a6ce198c3d4505533 Mon Sep 17 00:00:00 2001 From: Salah Ghanim Date: Tue, 26 Apr 2022 15:44:54 +0200 Subject: [PATCH] wrap supports iOS 'file://' path that's common for react-native files support uris / file paths that start with file:// --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 03063fe12..304f61e41 100644 --- a/index.js +++ b/index.js @@ -78,8 +78,10 @@ if(!RNFetchBlob || !RNFetchBlob.fetchBlobForm || !RNFetchBlob.fetchBlob) { } function wrap(path:string):string { - const prefix = path.startsWith('content://') ? 'RNFetchBlob-content://' : 'RNFetchBlob-file://' - return prefix + path + if (path.startsWith('file://') || path.startsWith('content://')){ + return 'RNFetchBlob-'+path; + } + return 'RNFetchBlob-file://' + path } /**