Skip to content

High performance self-hosted photo and video management solution.

feat(web): support uploading Insta360 file format (#2725)

TruongSinh Tran-Nguyen48492b9f4e57
diff --git a/mobile/lib/utils/files_helper.dart b/mobile/lib/utils/files_helper.dart
index 8b9d5c0409..81fae9cee0 100644
--- a/mobile/lib/utils/files_helper.dart
+++ b/mobile/lib/utils/files_helper.dart
@@ -47,6 +47,12 @@ class FileHelper {
case 'webm':
return {"type": "video", "subType": "webm"};
+ case 'insp':
+ return {"type": "image", "subType": "jpeg"};
+
+ case 'insv':
+ return {"type": "video", "subType": "mp4"};
+
default:
return {"type": "unsupport", "subType": "unsupport"};
}
diff --git a/web/src/lib/utils/asset-utils.ts b/web/src/lib/utils/asset-utils.ts
index 0363962dcc..c12fe7b441 100644
--- a/web/src/lib/utils/asset-utils.ts
+++ b/web/src/lib/utils/asset-utils.ts
@@ -146,6 +146,10 @@ export function getFileMimeType(file: File): string {
return 'image/x-fuji-raf';
case 'srw':
return 'image/x-samsung-srw';
+ case 'insp':
+ return 'image/jpeg';
+ case 'insv':
+ return 'video/mp4';
default:
return '';
}
diff --git a/web/src/lib/utils/file-uploader.ts b/web/src/lib/utils/file-uploader.ts
index 9f91ff0474..a97c6f85bb 100644
--- a/web/src/lib/utils/file-uploader.ts
+++ b/web/src/lib/utils/file-uploader.ts
@@ -22,7 +22,7 @@ export const openFileUploadDialog = async (
// When adding a content type that is unsupported by browsers, make sure
// to also add it to getFileMimeType() otherwise the upload will fail.
- fileSelector.accept = 'image/*,video/*,.heic,.heif,.dng,.3gp,.nef,.srw,.raf';
+ fileSelector.accept = 'image/*,video/*,.heic,.heif,.dng,.3gp,.nef,.srw,.raf,.insp,.insv';
fileSelector.onchange = async (e: Event) => {
const target = e.target as HTMLInputElement;