From 35062851768f5a41f0d7a5259c8caa023a05030f Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Mon, 9 Jan 2023 14:33:47 +0800 Subject: [PATCH] Better ID for media attachments The `i` persists for other attachments too. Not good. --- src/components/compose.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/compose.jsx b/src/components/compose.jsx index 2e5a7e30..aa7dfeea 100644 --- a/src/components/compose.jsx +++ b/src/components/compose.jsx @@ -726,10 +726,11 @@ function Compose({ {mediaAttachments.length > 0 && (
{mediaAttachments.map((attachment, i) => { - const { id } = attachment; + const { id, file } = attachment; + const fileID = file?.size + file?.type + file?.name; return ( {