From 31d5383ed2d899467e47d7c56989aab0ea6178a8 Mon Sep 17 00:00:00 2001 From: "Chavda Sachin (via MelvinBot)" Date: Sat, 25 Jul 2026 21:57:32 +0000 Subject: [PATCH] Fix: use unique filename for iOS shared images to bust stale preview cache Co-authored-by: Chavda Sachin --- ios/ShareViewController/ShareViewController.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ios/ShareViewController/ShareViewController.swift b/ios/ShareViewController/ShareViewController.swift index 4ad39131a40c..9fb853390d46 100644 --- a/ios/ShareViewController/ShareViewController.swift +++ b/ios/ShareViewController/ShareViewController.swift @@ -192,7 +192,10 @@ class ShareViewController: UIViewController { private func handleImageData(_ image: UIImage, folder: URL, completion: @escaping (FileSaveError?) -> Void) { os_log("Handling image data") - let filename = "shared_image.png" + // Use a unique filename per share so the resulting file:// URI differs every time. + // A constant name produced an identical URI on every share, and the URI-keyed image + // cache kept serving the first decoded receipt. See https://github.com/Expensify/App/issues/95075 + let filename = "shared_image_\(UUID().uuidString).png" processAndSave(data: image.pngData(), filename: filename, folder: folder, completion: completion) }