From 84cc925b08e97098d00c54fff9c1244f91055de3 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Mon, 28 Sep 2020 12:43:23 +0200 Subject: [PATCH] fix: Mimetype null --- lib/src/utils/matrix_file.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/utils/matrix_file.dart b/lib/src/utils/matrix_file.dart index 3c728f2..bfc0f3d 100644 --- a/lib/src/utils/matrix_file.dart +++ b/lib/src/utils/matrix_file.dart @@ -19,7 +19,8 @@ class MatrixFile { } 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(); }