// Binary content types that should be parsed as buffers
const BINARY_CONTENT_TYPE_PATTERNS = [
/^image\//,
/^video\//,
/^audio\//,
/^application\/pdf$/,
/^application\/zip$/,
/^application\/gzip$/,
/^application\/octet-stream$/,
]
export const isBinaryContentType = (contentType: string | undefined): boolean => {
if (!contentType) return false
const baseContentType = contentType.split(';')[0].trim().toLowerCase()
return BINARY_CONTENT_TYPE_PATTERNS.some(pattern => pattern.test(baseContentType))
}