From 75dddc9dbef2b18f8895100bba0fe0093a7cc8ab Mon Sep 17 00:00:00 2001 From: Sebastien Danthinne Date: Mon, 21 Oct 2024 15:04:17 +0000 Subject: [PATCH] fix(attachments): Add .jpeg to previewable image (#2770) This is necessary to be able to set .jpeg images as the background for kanban tiles. This extension is equivalent to .jpg, and is the default extension for uploading from iOS. Reviewed-on: https://kolaente.dev/vikunja/vikunja/pulls/2770 Co-authored-by: Sebastien Danthinne Co-committed-by: Sebastien Danthinne --- frontend/src/models/attachment.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/models/attachment.ts b/frontend/src/models/attachment.ts index 964b83f18..2e697f4ea 100644 --- a/frontend/src/models/attachment.ts +++ b/frontend/src/models/attachment.ts @@ -5,7 +5,7 @@ import type { IUser } from '@/modelTypes/IUser' import type { IFile } from '@/modelTypes/IFile' import type { IAttachment } from '@/modelTypes/IAttachment' -export const SUPPORTED_IMAGE_SUFFIX = ['.jpg', '.png', '.bmp', '.gif'] +export const SUPPORTED_IMAGE_SUFFIX = ['.jpeg', '.jpg', '.png', '.bmp', '.gif'] export function canPreview(attachment: IAttachment): boolean { return SUPPORTED_IMAGE_SUFFIX.some((suffix) => attachment.file.name.toLowerCase().endsWith(suffix)) @@ -26,4 +26,4 @@ export default class AttachmentModel extends AbstractModel implemen this.file = new FileModel(this.file) this.created = new Date(this.created) } -} +} \ No newline at end of file