From b6af7788e18ad72cdb5cd90759c681f1533830a1 Mon Sep 17 00:00:00 2001 From: mmomjian <50788000+mmomjian@users.noreply.github.com> Date: Sat, 30 Mar 2024 22:48:01 -0400 Subject: [PATCH] feat(server): extensions for MPEG and 3GP (#8400) * Update mime-types.spec.ts * Update mime-types.ts --- server/src/utils/mime-types.spec.ts | 3 +++ server/src/utils/mime-types.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/server/src/utils/mime-types.spec.ts b/server/src/utils/mime-types.spec.ts index 96c1921ba4..bce75e1e10 100644 --- a/server/src/utils/mime-types.spec.ts +++ b/server/src/utils/mime-types.spec.ts @@ -75,10 +75,13 @@ describe('mimeTypes', () => { { mimetype: 'image/x-sony-srf', extension: '.srf' }, { mimetype: 'image/x3f', extension: '.x3f' }, { mimetype: 'video/3gpp', extension: '.3gp' }, + { mimetype: 'video/3gpp', extension: '.3gpp' }, { mimetype: 'video/avi', extension: '.avi' }, { mimetype: 'video/mp2t', extension: '.m2ts' }, { mimetype: 'video/mp2t', extension: '.mts' }, { mimetype: 'video/mp4', extension: '.mp4' }, + { mimetype: 'video/mpeg', extension: '.mpe' }, + { mimetype: 'video/mpeg', extension: '.mpeg' }, { mimetype: 'video/mpeg', extension: '.mpg' }, { mimetype: 'video/msvideo', extension: '.avi' }, { mimetype: 'video/quicktime', extension: '.mov' }, diff --git a/server/src/utils/mime-types.ts b/server/src/utils/mime-types.ts index 789fc6a1c2..a888e4f423 100644 --- a/server/src/utils/mime-types.ts +++ b/server/src/utils/mime-types.ts @@ -56,6 +56,7 @@ const profile: Record = Object.fromEntries( const video: Record = { '.3gp': ['video/3gpp'], + '.3gpp': ['video/3gpp'], '.avi': ['video/avi', 'video/msvideo', 'video/vnd.avi', 'video/x-msvideo'], '.flv': ['video/x-flv'], '.insv': ['video/mp4'], @@ -64,6 +65,8 @@ const video: Record = { '.mkv': ['video/x-matroska'], '.mov': ['video/quicktime'], '.mp4': ['video/mp4'], + '.mpe': ['video/mpeg'], + '.mpeg': ['video/mpeg'], '.mpg': ['video/mpeg'], '.mts': ['video/mp2t'], '.webm': ['video/webm'],