From 4836b1e1973d3065f98b82642c04de8f982bdbdb Mon Sep 17 00:00:00 2001 From: sravan Date: Fri, 24 Jul 2026 16:08:58 +0530 Subject: [PATCH] fix(share): read the shared file via native Filesystem, not fetch (remote-origin) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sharing a photo into the app: the "Send to…" picker appeared and staging worked, but picking a chat said "no file found". Cause: the app loads its UI from the REMOTE origin (remote.bizgaze.com), and I read the staged bytes with fetch(convertFileSrc(uri)). Capacitor's local `_capacitor_file_` serving isn't on the remote origin, so that fetch is CORS-blocked / hits the remote server → 404. Read through the native bridge instead: Filesystem.readFile returns base64 in native code, never touching the webview network stack, so it reads the App Group file the app has entitlement access to. Falls back to it.path, then to the old webview path for local-asset builds. Web-only fix — no rebuild. Co-Authored-By: Claude Opus 4.8 --- server/public/home.html | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/server/public/home.html b/server/public/home.html index dea6e68..db08e02 100644 --- a/server/public/home.html +++ b/server/public/home.html @@ -1197,7 +1197,7 @@ -