Files
doneit-web/src/app/utils/allowedDocExtension.ts
T

13 lines
399 B
TypeScript
Raw Normal View History

2024-08-09 12:36:51 +01:00
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)
}
}