fix: Mimetype null
This commit is contained in:
parent
ab97c596ac
commit
84cc925b08
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue