From e0380c2e2ef952582ec5174f826170809ee104fc Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Thu, 29 Aug 2024 15:35:23 +0800 Subject: [PATCH 1/2] disable attachment preview until it's uploaded --- src/libs/ReportUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index f8f85beff4ad..d43c9067950a 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -4042,7 +4042,7 @@ function getUploadingAttachmentHtml(file?: FileObject): string { // file.type is a known mime type like image/png, image/jpeg, video/mp4 etc. if (file.type?.startsWith('image')) { - return `${file.name}`; + return `${file.name}`; } if (file.type?.startsWith('video')) { return ``; From d44ff01007748fdb44306d38b908faabef9641b1 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Sat, 31 Aug 2024 09:41:20 +0800 Subject: [PATCH 2/2] add comment --- src/libs/ReportUtils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 3ddc857ed507..aaaf0a205b43 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -4049,6 +4049,7 @@ function getUploadingAttachmentHtml(file?: FileObject): string { // file.type is a known mime type like image/png, image/jpeg, video/mp4 etc. if (file.type?.startsWith('image')) { + // optimistic image will have its preview disabled until we receive the (compressed if too big) image from the BE return `${file.name}`; } if (file.type?.startsWith('video')) {