Allow attaching the same file twice (#471)

This commit is contained in:
Will Chen
2025-06-23 15:02:55 -07:00
committed by GitHub
parent 05fb096348
commit 37fb643f6f

View File

@@ -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 = "";
}
};