fix: Mimetype null

This commit is contained in:
Christian Pauly 2020-09-28 12:43:23 +02:00
parent ab97c596ac
commit 84cc925b08

View file

@ -19,7 +19,8 @@ class MatrixFile {
} }
MatrixFile({this.bytes, this.name, this.mimeType}) { MatrixFile({this.bytes, this.name, this.mimeType}) {
mimeType ??= lookupMimeType(name, headerBytes: bytes); mimeType ??=
lookupMimeType(name, headerBytes: bytes) ?? 'application/octet-stream';
name = name.split('/').last.toLowerCase(); name = name.split('/').last.toLowerCase();
} }