fix: Mimetype null

This commit is contained in:
Christian Pauly 2020-09-28 12:43:23 +02:00
parent ab97c596ac
commit 84cc925b08
1 changed files with 2 additions and 1 deletions

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();
} }