From cdb45364c31fc2d0dbc738bbc4631def106d67f9 Mon Sep 17 00:00:00 2001 From: Jason Rasmussen Date: Thu, 17 Aug 2023 11:27:29 -0400 Subject: [PATCH] feat(server): add support for the tif extension (#3743) --- server/src/domain/domain.constant.spec.ts | 3 ++- server/src/domain/domain.constant.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/domain/domain.constant.spec.ts b/server/src/domain/domain.constant.spec.ts index 36cec5e1b6..aa958d5820 100644 --- a/server/src/domain/domain.constant.spec.ts +++ b/server/src/domain/domain.constant.spec.ts @@ -37,6 +37,7 @@ describe('mimeTypes', () => { { mimetype: 'image/sr2', extension: '.sr2' }, { mimetype: 'image/srf', extension: '.srf' }, { mimetype: 'image/srw', extension: '.srw' }, + { mimetype: 'image/tiff', extension: '.tif' }, { mimetype: 'image/tiff', extension: '.tiff' }, { mimetype: 'image/webp', extension: '.webp' }, { mimetype: 'image/x-adobe-dng', extension: '.dng' }, @@ -82,7 +83,7 @@ describe('mimeTypes', () => { { mimetype: 'video/x-ms-wmv', extension: '.wmv' }, { mimetype: 'video/x-msvideo', extension: '.avi' }, ]) { - it(`should map ${extension} to ${mimetype}`, async () => { + it(`should map ${extension} to ${mimetype}`, () => { expect({ ...mimeTypes.image, ...mimeTypes.video }[extension]).toContain(mimetype); }); } diff --git a/server/src/domain/domain.constant.ts b/server/src/domain/domain.constant.ts index b06720613c..4c881d7eee 100644 --- a/server/src/domain/domain.constant.ts +++ b/server/src/domain/domain.constant.ts @@ -66,6 +66,7 @@ const image: Record = { '.sr2': ['image/sr2', 'image/x-sony-sr2'], '.srf': ['image/srf', 'image/x-sony-srf'], '.srw': ['image/srw', 'image/x-samsung-srw'], + '.tif': ['image/tiff'], '.tiff': ['image/tiff'], '.webp': ['image/webp'], '.x3f': ['image/x3f', 'image/x-sigma-x3f'],