Cannot preview image with file name containing image extension (jpg,..) and mime type is application/octet-stream

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2025-04-17 00:00:29 +07:00
committed by Dat H. Pham
parent 3337a608be
commit 037fcc03a1
5 changed files with 89 additions and 3 deletions
@@ -41,7 +41,7 @@ extension AttachmentExtension on Attachment {
bool get isHTMLFile => type?.isHTMLFile(fileName: name) ?? false;
bool get isImage => type?.isImageFile() ?? false;
bool get isImage => type?.isImageSupportedPreview(fileName: name) ?? false;
bool get isText => (type?.isTextFile() ?? false)
|| name?.endsWith('.txt') == true