(mime: string)
| 1 | const startsWith = (bytes: Uint8Array, prefix: number[]) => prefix.every((value, index) => bytes[index] === value) |
| 2 | |
| 3 | export function isPdfAttachment(mime: string) { |
| 4 | return mime === "application/pdf" |
| 5 | } |
| 6 | |
| 7 | export function isMedia(mime: string) { |
| 8 | return mime.startsWith("image/") || isPdfAttachment(mime) |