diff --git a/src/util/mimetypes.js b/src/util/mimetypes.js index 121ae06..7a94e0c 100644 --- a/src/util/mimetypes.js +++ b/src/util/mimetypes.js @@ -26,12 +26,13 @@ export const ALLOWED_BLOB_MIMETYPES = [ ]; export function getBlobSafeMimeType(mimetype) { - if (!ALLOWED_BLOB_MIMETYPES.includes(mimetype)) { + const [type] = mimetype.split(';'); + if (!ALLOWED_BLOB_MIMETYPES.includes(type)) { return 'application/octet-stream'; } // Required for Chromium browsers - if (mimetype === 'video/quicktime') { + if (type === 'video/quicktime') { return 'video/mp4'; } - return mimetype; + return type; }