Parse the mime type out of the content-type header

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Daniel Kennedy
2026-01-26 14:42:27 -05:00
parent 9700641a19
commit 3d9761876c
@@ -80,10 +80,11 @@ export async function streamExtractExternal(
}
const contentType = response.message.headers['content-type'] || ''
const mimeType = contentType.split(';', 1)[0].trim().toLowerCase()
const isZip =
contentType === 'application/zip' ||
contentType === 'application/x-zip-compressed' ||
contentType === 'zip'
mimeType === 'application/zip' ||
mimeType === 'application/x-zip-compressed' ||
mimeType === 'zip'
// Extract filename from Content-Disposition header
const contentDisposition =