1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-10 23:22:22 +02:00

chore(server): add support for .m2t (#15064)

* add m2t

* ordering
This commit is contained in:
Mert
2025-01-03 17:28:32 -05:00
committed by GitHub
parent b45ff8d09f
commit fcd372238f
4 changed files with 18 additions and 2 deletions

View File

@@ -98,7 +98,21 @@ const validImages = [
'.x3f',
];
const validVideos = ['.3gp', '.avi', '.flv', '.m2ts', '.mkv', '.mov', '.mp4', '.mpg', '.mts', '.vob', '.webm', '.wmv'];
const validVideos = [
'.3gp',
'.avi',
'.flv',
'.m2t',
'.m2ts',
'.mkv',
'.mov',
'.mp4',
'.mpg',
'.mts',
'.vob',
'.webm',
'.wmv',
];
const uploadTests = [
{

View File

@@ -78,6 +78,7 @@ describe('mimeTypes', () => {
{ mimetype: 'video/3gpp', extension: '.3gp' },
{ mimetype: 'video/3gpp', extension: '.3gpp' },
{ mimetype: 'video/avi', extension: '.avi' },
{ mimetype: 'video/mp2t', extension: '.m2t' },
{ mimetype: 'video/mp2t', extension: '.m2ts' },
{ mimetype: 'video/mp2t', extension: '.mts' },
{ mimetype: 'video/mp4', extension: '.mp4' },

View File

@@ -65,6 +65,7 @@ const video: Record<string, string[]> = {
'.avi': ['video/avi', 'video/msvideo', 'video/vnd.avi', 'video/x-msvideo'],
'.flv': ['video/x-flv'],
'.insv': ['video/mp4'],
'.m2t': ['video/mp2t'],
'.m2ts': ['video/mp2t'],
'.m4v': ['video/x-m4v'],
'.mkv': ['video/x-matroska'],