diff --git a/src/util/mimetypes.js b/src/util/mimetypes.js index 7a94e0c8..bf7efbce 100644 --- a/src/util/mimetypes.js +++ b/src/util/mimetypes.js @@ -26,6 +26,7 @@ export const ALLOWED_BLOB_MIMETYPES = [ ]; export function getBlobSafeMimeType(mimetype) { + if (typeof mimetype !== 'string') return 'application/octet-stream'; const [type] = mimetype.split(';'); if (!ALLOWED_BLOB_MIMETYPES.includes(type)) { return 'application/octet-stream';