fix: duplicate PDF uploads (#2139)

This commit is contained in:
Philip Okugbe 2026-04-29 10:01:47 +01:00 committed by GitHub
parent 3ecf27c6b0
commit 24be90b95f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,7 +19,9 @@ export const uploadAttachmentAction = handleAttachmentUpload({
}, },
validateFn: (file, allowMedia: boolean) => { validateFn: (file, allowMedia: boolean) => {
if ( if (
(file.type.includes("image/") || file.type.includes("video/")) && (file.type.includes("image/") ||
file.type.includes("video/") ||
file.type === "application/pdf") &&
!allowMedia !allowMedia
) { ) {
return false; return false;