allow to send files to chat

This commit is contained in:
Peter Maquiran
2024-08-09 12:36:51 +01:00
parent 28bc141d38
commit c35f1e1f44
11 changed files with 264 additions and 138 deletions
+12
View File
@@ -0,0 +1,12 @@
import { err, ok } from "neverthrow"
export function allowedDocExtension(type: string) {
if (type == 'application/pdf' || type == 'application/doc' || type == 'application/docx' ||
type == 'application/xls' || type == 'application/xlsx' || type == 'application/ppt' ||
type == 'application/pptx' || type == 'application/txt') {
return ok(true)
} else {
return err(false)
}
}