From 1ba622adc95d7e0845e7bf7fc8a77103d73e8c5b Mon Sep 17 00:00:00 2001 From: Lukas Date: Sun, 8 Dec 2024 21:35:23 -0500 Subject: [PATCH] feat: Add support for vob (#14590) Add support for vob --- server/src/services/asset-media.service.spec.ts | 2 +- server/src/utils/mime-types.spec.ts | 1 + server/src/utils/mime-types.ts | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/services/asset-media.service.spec.ts b/server/src/services/asset-media.service.spec.ts index da7e23be54..1daeb99d0b 100644 --- a/server/src/services/asset-media.service.spec.ts +++ b/server/src/services/asset-media.service.spec.ts @@ -98,7 +98,7 @@ const validImages = [ '.x3f', ]; -const validVideos = ['.3gp', '.avi', '.flv', '.m2ts', '.mkv', '.mov', '.mp4', '.mpg', '.mts', '.webm', '.wmv']; +const validVideos = ['.3gp', '.avi', '.flv', '.m2ts', '.mkv', '.mov', '.mp4', '.mpg', '.mts', '.vob', '.webm', '.wmv']; const uploadTests = [ { diff --git a/server/src/utils/mime-types.spec.ts b/server/src/utils/mime-types.spec.ts index 50fe760a04..05cd8566c8 100644 --- a/server/src/utils/mime-types.spec.ts +++ b/server/src/utils/mime-types.spec.ts @@ -92,6 +92,7 @@ describe('mimeTypes', () => { { mimetype: 'video/x-matroska', extension: '.mkv' }, { mimetype: 'video/x-ms-wmv', extension: '.wmv' }, { mimetype: 'video/x-msvideo', extension: '.avi' }, + { mimetype: 'video/mpeg', extension: '.vob' }, ]) { it(`should map ${extension} to ${mimetype}`, () => { expect({ ...mimeTypes.image, ...mimeTypes.video }[extension]).toContain(mimetype); diff --git a/server/src/utils/mime-types.ts b/server/src/utils/mime-types.ts index cbf6e5b489..165eb44a4f 100644 --- a/server/src/utils/mime-types.ts +++ b/server/src/utils/mime-types.ts @@ -74,6 +74,7 @@ const video: Record = { '.mpeg': ['video/mpeg'], '.mpg': ['video/mpeg'], '.mts': ['video/mp2t'], + '.vob': ['video/mpeg'], '.webm': ['video/webm'], '.wmv': ['video/x-ms-wmv'], };