mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
Support HEIC/HEIF (#16)
* Support HEIC/HEIF backup * Storing backup directly from original file from the phone * Directly read and backup video file - Improve performance on video backup
This commit is contained in:
parent
f578ca6d47
commit
38c968d47e
15 changed files with 252 additions and 232 deletions
|
|
@ -1,9 +1,7 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
|
||||
class FileHelper {
|
||||
static getMimeType(String filePath) {
|
||||
debugPrint(filePath);
|
||||
var fileExtension = p.extension(filePath).split(".")[1];
|
||||
|
||||
switch (fileExtension.toLowerCase()) {
|
||||
|
|
@ -28,6 +26,12 @@ class FileHelper {
|
|||
case 'avi':
|
||||
return {"type": "video", "subType": "x-msvideo"};
|
||||
|
||||
case 'heic':
|
||||
return {"type": "image", "subType": "heic"};
|
||||
|
||||
case 'heif':
|
||||
return {"type": "image", "subType": "heif"};
|
||||
|
||||
default:
|
||||
return {"type": "unsupport", "subType": "unsupport"};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue