From f182c4ba0a0ae8e877001b5a4c62a216a8c5c036 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Thu, 21 Oct 2021 12:03:57 +0200 Subject: [PATCH] MOBILE-3833 file: Change logic in unconvertFileSrc --- src/core/services/file.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/services/file.ts b/src/core/services/file.ts index 0678e3b35..2316855b8 100644 --- a/src/core/services/file.ts +++ b/src/core/services/file.ts @@ -1274,9 +1274,11 @@ export class CoreFileProvider { return src; } - const scheme = CoreApp.isIOS() ? CoreConstants.CONFIG.ioswebviewscheme : 'http'; + if (CoreApp.isIOS()) { + return src.replace(CoreConstants.CONFIG.ioswebviewscheme + '://localhost/_app_file_', 'file://'); + } - return src.replace(scheme + '://localhost/_app_file_', 'file://'); + return src.replace('http://localhost/_app_file_', 'file://'); } /**