From 37fb643f6f790fd7bdb282ff9f19a181f517ac01 Mon Sep 17 00:00:00 2001 From: Will Chen Date: Mon, 23 Jun 2025 15:02:55 -0700 Subject: [PATCH] Allow attaching the same file twice (#471) --- src/hooks/useAttachments.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hooks/useAttachments.ts b/src/hooks/useAttachments.ts index 95ed53e..173c2ba 100644 --- a/src/hooks/useAttachments.ts +++ b/src/hooks/useAttachments.ts @@ -13,6 +13,8 @@ export function useAttachments() { if (e.target.files && e.target.files.length > 0) { const files = Array.from(e.target.files); setAttachments((attachments) => [...attachments, ...files]); + // Clear the input value so the same file can be selected again + e.target.value = ""; } };