Introduce a list of image mime types we can support as images

E.g. TIFF will now be handled as a generic file, not image, even though it has mime prefix "image/"
This commit is contained in:
N-Pex 2025-11-05 16:56:17 +01:00
parent bdc66fa603
commit 4662bcdc7d
10 changed files with 30 additions and 10 deletions

View file

@ -77,7 +77,7 @@ export class AttachmentManager {
private async prepareUpload(attachment: Attachment, room: KeanuRoom): Promise<Attachment> {
const file = attachment.file;
if (file.type.startsWith("image/")) {
if (utils.isSupportedImageType(file.type)) {
let url = URL.createObjectURL(file);
attachment.src = url;
if (attachment.src) {