Fix crash with unknown mime type
This commit is contained in:
parent
19f674cf5f
commit
2ded7d9b1f
1 changed files with 1 additions and 0 deletions
|
@ -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';
|
||||
|
|
Loading…
Reference in a new issue